Debian Codegraph @

neutron_fwaas/tests/contrib/post_test_hook.sh

raw symbols SCIP
1 #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash
2
3 set -xe
4
5 FWAAS_DIR="$BASE/new/neutron-fwaas"
6 NEUTRON_DIR="$BASE/new/neutron"
7 TEMPEST_DIR="$BASE/new/tempest"
8 SCRIPTS_DIR="/usr/os-testr-env/binscip-shell filesystem . . `/usr/os-testr-env/bin`."
9
10 venv=${1:-"dsvm-functional"}
11
12 function generate_testr_resultsscip-shell shell shell-project 0.0.0 generate_testr_results(). {
13 # Give job user rights to access tox logs
14 sudoscip-shell system . . sudo. -H -u $owner chmod o+rw .
15 sudoscip-shell system . . sudo. -H -u $owner chmod o+rw -R .stestr
16 if [scip-shell system . . `[`. -f ".stestr/0" ] ; then
17 .tox/$venv/bin/subunit-1to2 < .stestr/0 > ./stestr.subunit
18 $SCRIPTS_DIR/subunit2html ./stestr.subunit testr_results.html
19 gzipscip-shell system . . gzip. -9 ./stestr.subunit
20 gzipscip-shell system . . gzip. -9 ./testr_results.html
21 sudoscip-shell system . . sudo. mv ./*.gz /opt/stack/logs/scip-shell filesystem . . `/opt/stack/logs/`.
22 fi
23 }
24
25 function dsvm_functional_prep_funcscip-shell shell shell-project 0.0.0 dsvm_functional_prep_func(). {
26 :
27 }
28
29 if [[ "$venv" == dsvm-functional* ]]
30 then
31 owner=stack
32 sudo_env=
33 # Set owner permissions according to job's requirements.
34 cd $FWAAS_DIR
35 sudoscip-shell system . . sudo. chown -R $owner:stack $FWAAS_DIR
36 sudoscip-shell system . . sudo. chown -R $owner:stack $NEUTRON_DIR
37 # Prep the environment according to job's requirements.
38 $prep_func
39
40 # Run tests
41 echoscip-shell system . . echo. "Running neutron-fwaas $venv test suite"
42 set +e
43 sudoscip-shell system . . sudo. -H -u $owner $sudo_env tox -e $venv
44 testr_exit_code=$?
45 set -e
46
47 # Collect and parse results
48 generate_testr_resultsscip-shell shell shell-project 0.0.0 generate_testr_results().
49 exit $testr_exit_code
50 fi