Skip to content

Commit 08b90eb

Browse files
committed
add upgrade tests
Signed-off-by: Orit Wasserman <[email protected]>
1 parent 1b9f009 commit 08b90eb

8 files changed

+76
-28
lines changed

.emacs

+43-18
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
;; -*- mode: emacs-lisp -*-
2+
(package-initialize)
23

34
(require 'xcscope)
45
(require 'cc-mode)
@@ -7,7 +8,7 @@
78

89
(require 'package)
910
(add-to-list 'package-archives
10-
'("melpa" . "http://melpa.org/packages/") t)
11+
'("melpa" . "http://melpa.org/packages/"))
1112
(when (< emacs-major-version 24)
1213
;; For important compatibility libraries like cl-lib
1314
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
@@ -16,10 +17,8 @@
1617
(add-to-list 'package-archives
1718
'("melpa-stable" . "http://stable.melpa.org/packages/") t)
1819
;; set style
19-
20-
(setq-default c-basic-offset 4 c-default-style "linux")
21-
(setq-default tab-width 4 indent-tabs-mode t)
22-
(define-key c-mode-base-map (kbd "RET") 'newline-and-indent)
20+
;;(setq-default c-basic-offset 2 c-default-style "linux")`(setq-default tab-width 8 indent-tabs-mode t)
21+
;;(define-key c-mode-base-map (kbd "RET") 'newline-and-indent)
2322

2423
;; auto repair brackets
2524
;;(require 'autopair)
@@ -33,6 +32,7 @@
3332

3433
;;; auto complete mod
3534
;;; should be loaded after yasnippet so that they can work together
35+
(add-to-list 'load-path "~/.emacs.d/elpa")
3636
(require 'auto-complete-config)
3737
(add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict")
3838
(ac-config-default)
@@ -62,13 +62,6 @@
6262
;display column number
6363
(column-number-mode 1)
6464

65-
66-
;;(defun my-c-mode-hook ()
67-
;; (setq c-basic-offset 4
68-
;; c-indent-level 4
69-
;; c-default-style "cc-mode"))
70-
;;(add-hook 'c-mode-common-hook 'my-c-mode-hook)
71-
7265
; Allow completions like em-s-region to complete to emacspeak-speak-region
7366
;;(partial-completion-mode)
7467

@@ -198,17 +191,19 @@
198191
(global-set-key (kbd "C-c e") 'emacspeak-set-language-to-english)
199192
(global-set-key (kbd "C-c d") 'emacspeak-set-language-to-german))
200193

201-
(define-prefix-command 'f8-map nil "f7=grep, f8=compile")
202-
(define-key f8-map [f8] 'compile)
203-
(define-key f8-map [f7] 'grep)
204-
(global-set-key [f8] 'f8-map)
205-
(custom-set-variables
194+
(global-set-key (kbd "C-c c") 'compile)
195+
(global-set-key (kbd "C-c g") 'grep)
196+
;(define-prefix-command 'f8-map nil "f7=grep, f8=compile")
197+
;(define-key f8-map [f8] 'compile)
198+
;(define-key f8-map [f7] 'grep)
199+
;(global-set-key [f8] 'f8-map)
200+
;(custom-set-variables
206201
;; custom-set-variables was added by Custom.
207202
;; If you edit it by hand, you could mess it up, so be careful.
208203
;; Your init file should contain only one such instance.
209204
;; If there is more than one, they won't work right.
210205
'(column-number-mode t)
211-
'(load-home-init-file t t))
206+
'(load-home-init-file t t)
212207
(custom-set-faces
213208
;; custom-set-faces was added by Custom.
214209
;; If you edit it by hand, you could mess it up, so be careful.
@@ -286,3 +281,33 @@
286281
;; c-indent-level 4
287282
;; c-default-style "cc-mode"))
288283
;;(add-hook 'c-mode-common-hook 'my-c-mode-hook)
284+
285+
(c-add-style "my-style"
286+
'("cc-mode"
287+
(indent-tabs-mode t) ; use spaces rather than tabs
288+
(c-basic-offset . 2) ; indent by 2 spaces
289+
(c-offsets-alist . ((inline-open . 0) ; custom indentation rules
290+
(brace-list-open . 0)
291+
(statement-case-open . +)))))
292+
293+
(defun my-c++-mode-hook ()
294+
(c-set-style "my-style") ; use my-style defined above
295+
(auto-fill-mode)
296+
(c-toggle-auto-hungry-state 1)
297+
(c-toggle-auto-state 1)
298+
(define-key c-mode-base-map (kbd "RET") 'newline-and-indent)
299+
)
300+
301+
(add-hook 'c++-mode-hook 'my-c++-mode-hook)
302+
303+
(setq-default show-trailing-whitespace t)
304+
305+
(load-file "/home/owasserm/emacs-for-python/epy-init.el")
306+
(add-to-list 'load-path "/home/owasserm/emacs-for-python/") ;; tell where to load the various files
307+
(require 'epy-setup) ;; It will setup other loads, it is required!
308+
(require 'epy-python) ;; If you want the python facilities [optional]
309+
(require 'epy-completion) ;; If you want the autocompletion settings [optional]
310+
(require 'epy-editing) ;; For configurations related to editing [optional]
311+
(require 'epy-nose) ;; For nose integration
312+
313+
(add-hook 'python-mode-hook (function cscope:hook))

clean_pool.sh

100644100755
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
22

33
BIN=$1
4-
$BIN/rados rmpool purge .rgw.root --yes-i-really-really-mean-it
4+
$BIN/rados purge .rgw.root --yes-i-really-really-mean-it
55
$BIN/rados cppool .rgw.root.backup .rgw.root

old_multi_zone_config.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/bash -x
22

3-
SCRIPTS=/home/owasserm/scripts
3+
CONFIG=/home/owasserm/config
44
ADMIN=/home/owasserm/hammer/src/radosgw-admin
5-
$ADMIN region set < $SCRIPTS/region0.json
5+
$ADMIN region set < $CONFIG/region0.json
66
$ADMIN region default --rgw-region region0
77
$ADMIN region get
88

9-
$ADMIN zone set --rgw-zone r0z0 < $SCRIPTS/r0z0.json
9+
$ADMIN zone set --rgw-zone r0z0 < $CONFIG/r0z0.json
1010
$ADMIN zone get --rgw-zone r0z0
11-
$ADMIN zone set --rgw-zone r0z1 < $SCRIPTS/r0z1.json
11+
$ADMIN zone set --rgw-zone r0z1 < $CONFIG/r0z1.json
1212
$ADMIN zone get --rgw-zone r0z1
1313

run_gateway.sh

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,30 @@
1+
#!/bin/bash -x
12

23
PORT=8000
34
CEPH_BIN="./bin"
5+
rgw_name="rgw"
46

57
while [ $# -gt 0 ]; do
68
case "$1" in
79
-p|--port)
810
PORT="$2"
11+
rgw_name=$rgw_name$2
912
;;
1013
-z|--zone)
1114
ZONE="--rgw-zone $2"
15+
rgw_name=$rgw_name$2
1216
;;
1317
-b|--bin)
1418
CEPH_BIN="$2"
1519
;;
20+
-c|--config)
21+
CEPH_CONFIG="$2"
22+
;;
1623
*)
1724
# unknown option
1825
;;
1926
esac
2027
shift # past argument
2128
done
2229

23-
$CEPH_BIN/radosgw --log-file ./out/rgw.log --rgw-frontends="civetweb port=$PORT" --debug-rgw=20 --debug-ms=5 $ZONE
30+
$CEPH_BIN/radosgw --log-file ./out/$rgw_name.log --rgw-frontends="civetweb port=$PORT" $CEPH_CONFIG --debug-rgw=20 --debug-ms=5 $ZONE

run_s3_tests.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
conf=${1:-"skinny.conf"}
12
cd $HOME/ceph/s3-tests/
23

3-
S3TEST_CONF=$HOME/ceph/s3-tests/skinny.conf $HOME/ceph/s3-tests/virtualenv/bin/nosetests --debug=DEBUG s3tests -v -a '!fails_on_rgw'
4+
S3TEST_CONF=$HOME/ceph/s3-tests/$conf $HOME/ceph/s3-tests/virtualenv/bin/nosetests --debug=DEBUG s3tests -v -a '!fails_on_rgw'

upgrate_test_hammer.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
OLD=/home/owasserm/hammer/src
22
NEW=/home/owasserm/jewel/src
33
OUT_DIR=/home/owasserm/upgrade
4+
CONFIG_SCRIPT=$1
45

56
export CEPH_OUT_DIR=$OUT_DIR/out
67
export CEPH_DEV_DIR=$OUT_DIR/dev
@@ -9,9 +10,8 @@ export CEPH_DEV_DIR=$OUT_DIR/dev
910
echo "Running hammer"
1011
cd $OLD
1112
./vstart.sh -n
12-
# config
13-
echo "config with" $1
14-
$1
13+
echo "config with" $CONFIG_SCRIPT
14+
$CONFIG_SCRIPT
1515
echo "Backing up .rgw.root pool"
1616
./rados mkpool .rgw.root.backup
1717
./rados cppool .rgw.root .rgw.root.backup

upgrate_test_jewel.sh

+2
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ echo "Running jewel"
2626
cd $NEW
2727
./vstart.sh
2828
/home/owasserm/scripts/run_gateway.sh -b $NEW/ $ZONE
29+
30+
/home/owasserm/scripts/run_gateway.sh -b $NEW/ -p 8001 $ZONE

us_region_config.sh

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash -x
2+
3+
CONFIG=/home/owasserm/scripts
4+
ADMIN=/home/owasserm/hammer/src/radosgw-admin
5+
$ADMIN region set < $CONFIG/us.json
6+
$ADMIN region default --rgw-region us
7+
$ADMIN region get
8+
9+
$ADMIN zone set --rgw-zone us-west < $CONFIG/us-west.json
10+
$ADMIN zone get --rgw-zone us-west
11+
$ADMIN zone set --rgw-zone us-east < $CONFIG/us-east.json
12+
$ADMIN zone get --rgw-zone us-east
13+

0 commit comments

Comments
 (0)