Skip to content

Commit 26b5838

Browse files
committed
tests not in parallel and using built dir for test output
1 parent ef5b967 commit 26b5838

5 files changed

Lines changed: 27 additions & 5 deletions

File tree

api/meson.build

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,32 +28,38 @@ foreach volume: g4objects.keys()
2828
pars = g4objects[volume]
2929
test('api_show_template_code_for_' + volume,
3030
python_exe,
31+
is_parallel: false,
3132
env : {'PYTHONDONTWRITEBYTECODE': '1'},
3233
args : [api_dir + 'system_template.py', '-gv', volume])
3334
test('api_template_show_code_for_volume' + volume + '_with_parameters_' + pars.replace(' ', ''),
3435
python_exe,
36+
is_parallel: false,
3537
env : {'PYTHONDONTWRITEBYTECODE': '1'},
3638
args : [api_dir + 'system_template.py', '-gv', volume, '-gvp', pars.replace(' ', '')])
3739
endforeach
3840

3941
test('api_show_template_code_for_G4Cons',
4042
python_exe,
43+
is_parallel: false,
4144
env : {'PYTHONDONTWRITEBYTECODE': '1'},
4245
args : [api_dir + 'system_template.py', '-gv', 'G4Cons', '-silent'])
4346

4447
test_dir = meson.current_build_dir() + '/../test'
4548
test('api_create_system',
4649
python_exe,
50+
is_parallel: false,
4751
env : {'PYTHONDONTWRITEBYTECODE': '1'},
4852
args : [api_dir + 'system_template.py', '-s', 'test'], priority : 5)
4953
foreach format : ['ascii', 'sqlite']
5054
test('api_template_build_geometry_in_test_for_format_' + format,
5155
python_exe,
56+
is_parallel: false,
5257
env : {'PYTHONDONTWRITEBYTECODE': '1'},
5358
args : ['test.py', '-f', format], workdir : test_dir, priority : -1)
5459
test('api_run_gemc_for_format_' + format,
5560
gemc, args : ['test.yaml', '-gsystem="[{name: test, factory: ' + format + '}]" '],
5661
workdir : test_dir,
62+
is_parallel: false,
5763
env : project_test_env,
5864
priority : -2)
5965
endforeach
@@ -69,21 +75,25 @@ foreach volume: g4objects.keys()
6975
pars = g4objects[volume]
7076
test('api_create_template_system_with' + volume,
7177
python_exe,
78+
is_parallel: false,
7279
env : {'PYTHONDONTWRITEBYTECODE': '1'},
7380
args : [api_dir + 'system_template.py', '-s', test_name], priority : 4)
7481
test('api_template_replace_geometry_with' + volume,
7582
python_exe,
83+
is_parallel: false,
7684
env : {'PYTHONDONTWRITEBYTECODE': '1'},
7785
args: [api_dir + 'system_template.py', '-gv', volume, '-gvp', pars, geo_py, sub_name], workdir : test_dir, priority : -3)
7886
foreach format : ['ascii', 'sqlite']
7987
test('api_template_build_geometry_in_test_of_replacing_geometry_with' + volume + '_with_format' + format,
8088
python_exe,
89+
is_parallel: false,
8190
env : {'PYTHONDONTWRITEBYTECODE': '1'},
8291
args : [python_main, '-f', format], workdir : test_dir, priority : -4)
8392
test('api_run_gemc_with_replaced_geometry_using_' + volume + '_with_format' + format,
8493
gemc,
8594
args : [yaml_file, '-gsystem="[{name: ' + test_name + ', factory: ' + format + '}]" '],
8695
workdir : test_dir,
96+
is_parallel: false,
8797
env : project_test_env,
8898
priority : -30)
8999
endforeach

ci/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ ls -lR $GEMC >> $compile_log
8282
# if $1 is NOT one of sanitize option, run meson test
8383
if [[ $1 != @(address|thread|undefined|memory|leak) ]]; then
8484
echo " > Running meson test" > $test_log
85-
meson test -j 1 --print-errorlogs >> $test_log
85+
meson test -j 1 --print-errorlogs --no-rebuild >> $test_log
8686
if [ $? -ne 0 ]; then
8787
echo "Test failed. Log: "
8888
cat $test_log

dockerfiles/Dockerfile-gemc-dev3-almalinux94

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# syntax=docker/dockerfile:1.7
2+
13
FROM jeffersonlab/geant4:g4v11.3.2-almalinux94
24
LABEL maintainer="Maurizio Ungaro <ungaro@jlab.org>"
35

examples/meson.build

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
examples_dir = get_option('prefix') + '/examples/'
2+
test_outdir = meson.current_build_dir()
23
sql_db = get_option('prefix') + '/examples/gemc.db'
34

45
python_exe = import('python').find_installation('python3')
@@ -30,23 +31,26 @@ foreach branch : examples_map.keys()
3031
geo_test_name = 'examples_geo_' + branch + '_' + example + '_' + format + '_variation_' + variation
3132
run_test_name_asci = 'examples_run_asci_output_' + branch + '_' + example + '_' + format + '_variation_' + variation
3233
run_test_name_root = 'examples_run_root_output_' + branch + '_' + example + '_' + format + '_variation_' + variation
33-
ascii_output = '-gstreamer="[{format: ascii, filename: out' + branch + variation + format + '}]"'
34-
root_output = '-gstreamer="[{format: root, filename: out' + branch + variation + format + '}]"'
34+
ascii_output = '-gstreamer="[{format: ascii, filename: ' + test_outdir + '/' + branch + variation + format + '}]"'
35+
root_output = '-gstreamer="[{format: root, filename: ' + test_outdir + '/' + branch + variation + format + '}]"'
3536
test(geo_test_name,
3637
python_exe,
3738
args : [example_dir + example + '.py', '-f', format, '-sql', sql_db, '-v', variation], # the sql flag is ignored for ascii format
3839
workdir : example_dir,
40+
is_parallel : false,
3941
env : { 'PYTHONDONTWRITEBYTECODE' : '1' },
4042
priority : 10)
4143
test(run_test_name_asci,
4244
gemc,
4345
args : [yaml_file, '-gsystem="[{name: ' + example + ', factory: ' + format + ', variation: ' + variation + '}]"', ascii_output, '-sql=' + sql_db],
4446
workdir : example_dir,
47+
is_parallel : false,
4548
priority : -10)
4649
test(run_test_name_root,
4750
gemc,
4851
args : [yaml_file, '-gsystem="[{name: ' + example + ', factory: ' + format + ', variation: ' + variation + '}]"', root_output, '-sql=' + sql_db],
4952
workdir : example_dir,
53+
is_parallel : false,
5054
priority : -11)
5155
endforeach
5256

@@ -55,23 +59,26 @@ foreach branch : examples_map.keys()
5559
geo_test_name = 'examples_geo_' + branch + '_' + example + '_' + format + '_run_' + run_value
5660
run_test_name_asci = 'examples_run_asci_output_' + branch + '_' + example + '_' + format + '_run_' + run_value
5761
run_test_name_root = 'examples_run_root_output_' + branch + '_' + example + '_' + format + '_run_' + run_value
58-
ascii_output = '-gstreamer="[{format: ascii, filename: out' + branch + run_value + format + '}]"'
59-
root_output = '-gstreamer="[{format: root, filename: out' + branch + run_value + format + '}]"'
62+
ascii_output = '-gstreamer="[{format: ascii, filename: ' + test_outdir + '/' + branch + run_value + format + '}]"'
63+
root_output = '-gstreamer="[{format: root, filename: ' + test_outdir + '/' + branch + run_value + format + '}]"'
6064
test(geo_test_name,
6165
python_exe,
6266
args : [example_dir + example + '.py', '-f', format, '-sql', sql_db, '-r', run_value], # the sql flag is ignored for ascii format
6367
workdir : example_dir,
68+
is_parallel : false,
6469
env : { 'PYTHONDONTWRITEBYTECODE' : '1' },
6570
priority : 9)
6671
test(run_test_name_asci,
6772
gemc,
6873
args : [yaml_file, '-gsystem="[{name: ' + example + ', factory: ' + format + ', runno:' + run_value + '}]"', ascii_output, '-sql=' + sql_db],
6974
workdir : example_dir,
75+
is_parallel : false,
7076
priority : -12)
7177
test(run_test_name_root,
7278
gemc,
7379
args : [yaml_file, '-gsystem="[{name: ' + example + ', factory: ' + format + ', runno:' + run_value + '}]"', root_output, '-sql=' + sql_db],
7480
workdir : example_dir,
81+
is_parallel : false,
7582
priority : -13)
7683
endforeach
7784

meson.build

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ foreach L : LD
147147
python_exe,
148148
args : [geo_python_script],
149149
workdir : examples_dir,
150+
is_parallel: false,
150151
env : { 'PYTHONDONTWRITEBYTECODE' : '1' },
151152
priority : 20)
152153
endforeach
@@ -176,6 +177,7 @@ foreach L : LD
176177
exe,
177178
env : project_test_env,
178179
args : arguments,
180+
is_parallel: false,
179181
priority : -20)
180182
endforeach
181183
endif
@@ -259,6 +261,7 @@ foreach opt_dict : test_options
259261
gemc,
260262
args : test_arguments + gemc_test_sqlite,
261263
# suite : 'gemc',
264+
is_parallel: false,
262265
timeout : 60, # adjust as needed
263266
priority: -20
264267
)

0 commit comments

Comments
 (0)