Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit 9f6cec9

Browse files
author
Michael Grauer
committed
BUG: Refs #212. Added in some test data to better locations.
Part of a process of improving the batchmake tests.
1 parent 56d461e commit 9f6cec9

22 files changed

+270
-0
lines changed

modules/batchmake/tests/testfiles/bin/AnotherApp.bmm

Whitespace-only changes.

modules/batchmake/tests/testfiles/bin/MyApp2.bmm

Whitespace-only changes.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<BatchMakeApplicationWrapper>
2+
<BatchMakeApplicationWrapperVersion>1.0</BatchMakeApplicationWrapperVersion>
3+
<Module>
4+
<Name>PixelCounter</Name>
5+
<Version>Not defined</Version>
6+
<Path>SET_PATH_TO/PixelCounter</Path>
7+
<Parameters>
8+
<Param>
9+
<Type>4</Type>
10+
<Name>filename</Name>
11+
<Value></Value>
12+
<Parent>0</Parent>
13+
<External>1</External>
14+
<Optional>0</Optional>
15+
</Param>
16+
<Param>
17+
<Type>3</Type>
18+
<Name>threshold</Name>
19+
<Value></Value>
20+
<Parent>0</Parent>
21+
<External>0</External>
22+
<Optional>0</Optional>
23+
</Param>
24+
<Param>
25+
<Type>1</Type>
26+
<Name>GenerateMetaOutput</Name>
27+
<Value>-generateMetaOutput</Value>
28+
<Parent>0</Parent>
29+
<External>0</External>
30+
<Optional>1</Optional>
31+
</Param>
32+
<Param>
33+
<Type>1</Type>
34+
<Name>GenerateXMLMetaOutput</Name>
35+
<Value>-oxml</Value>
36+
<Parent>0</Parent>
37+
<External>0</External>
38+
<Optional>1</Optional>
39+
</Param>
40+
<Param>
41+
<Type>1</Type>
42+
<Name>GenerateXMLFile</Name>
43+
<Value>-ofxml</Value>
44+
<Parent>0</Parent>
45+
<External>0</External>
46+
<Optional>1</Optional>
47+
</Param>
48+
<Param>
49+
<Type>4</Type>
50+
<Name>GenerateXMLFile.GenerateXMLFile</Name>
51+
<Value></Value>
52+
<Parent>3</Parent>
53+
<External>2</External>
54+
<Optional>0</Optional>
55+
</Param>
56+
</Parameters>
57+
</Module>
58+
</BatchMakeApplicationWrapper>

modules/batchmake/tests/testfiles/bin/TestApp1.bmm

Whitespace-only changes.

modules/batchmake/tests/testfiles/bin/TestApp2.bmm

Whitespace-only changes.

modules/batchmake/tests/testfiles/bin/myapp.bmm

Whitespace-only changes.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Should the script end in case of errors
2+
ExitOnError(1)
3+
4+
Echo('This script should not compile')
5+
6+
Foreach(var ${varlist})
7+
Endforeach()
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Should the script end in case of errors
2+
ExitOnError(1)
3+
4+
# all params are hardcoded, just used to check for creating a dagjob and condor scripts
5+
6+
SetApp(pixelCounter @PixelCounter)
7+
SetAppOption(pixelCounter.threshold 10)
8+
SetAppOption(pixelCounter.GenerateXMLFile 1)
9+
10+
Set(hardcodedlist 'sphere_5.mha' 'sphere_10.mha' 'sphere_15.mha')
11+
12+
# Generic script options
13+
Foreach(file ${hardcodedlist})
14+
GetFilename(stem ${file} NAME_WITHOUT_EXTENSION)
15+
16+
SetAppOption(pixelCounter.filename ${file})
17+
SetAppOption(pixelCounter.GenerateXMLFile.GenerateXMLFile ${stem}.xml)
18+
19+
# Run the application
20+
Run(prog_output ${pixelCounter})
21+
22+
Endforeach(file)
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Should the script end in case of errors
2+
ExitOnError(1)
3+
4+
# Imported parameters: cfg_input_directory, cfg_output_directory, cfg_application_directory, cfg_threshold
5+
Include(PixelCounter.config.bms)
6+
7+
# Application setup
8+
SetApp(pixelCounter @PixelCounter)
9+
SetApp(myapp2 @MyApp2)
10+
SetAppOption(pixelCounter.threshold ${cfg_threshold})
11+
SetAppOption(pixelCounter.GenerateXMLFile 1)
12+
13+
14+
# Generic script options
15+
Foreach(file ${cfg_input_cart})
16+
GetFilename(stem ${file} NAME_WITHOUT_EXTENSION)
17+
18+
SetAppOption(pixelCounter.filename ${file})
19+
SetAppOption(pixelCounter.GenerateXMLFile.GenerateXMLFile ${stem}.${cfg_output1}.xml)
20+
21+
# Run the application
22+
CondorPostScript(pixelCounter ${cfg_condorpostscript} ${cfg_midas_baseURL} ${cfg_itemid} ${cfg_email} ${cfg_appname} ${cfg_apikey} ${cfg_output_directory} ${stem}.${cfg_output1}.xml)
23+
Run(prog_output ${pixelCounter})
24+
25+
Endforeach(file)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Should the script end in case of errors
2+
ExitOnError(1)
3+
4+
# Imported parameters: cfg_input_directory, cfg_output_directory, cfg_application_directory, cfg_threshold
5+
Include(PixelCounter.config.bms)
6+
7+
# Application setup
8+
SetApp(pixelCounter @PixelCounter)
9+
SetAppOption(pixelCounter.threshold ${cfg_threshold})
10+
SetAppOption(pixelCounter.GenerateXMLFile 1)
11+
12+
13+
# Generic script options
14+
Foreach(file ${cfg_input_cart})
15+
GetFilename(stem ${file} NAME_WITHOUT_EXTENSION)
16+
17+
SetAppOption(pixelCounter.filename ${file})
18+
SetAppOption(pixelCounter.GenerateXMLFile.GenerateXMLFile ${stem}.${cfg_output1}.xml)
19+
20+
# Run the application
21+
CondorPostScript(pixelCounter ${cfg_condorpostscript} ${cfg_midas_baseURL} ${cfg_itemid} ${cfg_email} ${cfg_appname} ${cfg_apikey} ${cfg_output_directory} ${stem}.${cfg_output1}.xml)
22+
Run(prog_output ${pixelCounter})
23+
24+
Endforeach(file)

0 commit comments

Comments
 (0)