Skip to content

Commit 4511ba5

Browse files
committed
Merge branch '3460-VRP_unit_test_seems_incorrect' into 'v92-bugfix'
Added pass_regular_expression to CMakeLists.txt in examples/VRP/check See merge request integer/scip!3828
2 parents ac4a592 + c3e1afa commit 4511ba5

File tree

15 files changed

+28
-9
lines changed

15 files changed

+28
-9
lines changed

applications/Coloring/check/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ foreach(instance ${instances})
4040
set_tests_properties("applications-coloring-${basename}"
4141
PROPERTIES
4242
PASS_REGULAR_EXPRESSION "Validation : Success"
43+
FAIL_REGULAR_EXPRESSION "ERROR"
4344
DEPENDS applications-coloring-build
4445
RESOURCE_LOCK libscip
4546
)

applications/CycleClustering/check/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ foreach(instance ${instances})
4848
)
4949
set_tests_properties("applications-cycleclustering-${basename}-${setting}"
5050
PROPERTIES
51-
PASS_REGULAR_EXPRESSION "optimal solution found"
51+
PASS_REGULAR_EXPRESSION "optimal solution found"
52+
FAIL_REGULAR_EXPRESSION "ERROR"
5253
DEPENDS applications-cycleclustering-build
5354
RESOURCE_LOCK libscip
5455
)

applications/MinIISC/check/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ foreach(instance ${instances})
4242
set_tests_properties("applications-miniisc-${basename}"
4343
PROPERTIES
4444
PASS_REGULAR_EXPRESSION "Primal Bound : \\+(${optval}\\.000000*|${optvalminusone}\\.999999*)e\\+00"
45+
FAIL_REGULAR_EXPRESSION "ERROR"
4546
DEPENDS applications-miniisc-build
4647
RESOURCE_LOCK libscip
4748
)

applications/Ringpacking/check/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ foreach(instance ${instances})
4141
set_tests_properties("applications-ringpacking-${basename}"
4242
PROPERTIES
4343
PASS_REGULAR_EXPRESSION "Validation : Success"
44+
FAIL_REGULAR_EXPRESSION "ERROR"
4445
DEPENDS applications-ringpacking-build
4546
RESOURCE_LOCK libscip
4647
)

applications/Scheduler/check/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ foreach(instance ${instances})
6161
set_tests_properties("applications-scheduler-${basename}"
6262
PROPERTIES
6363
PASS_REGULAR_EXPRESSION "Validation : Success"
64+
FAIL_REGULAR_EXPRESSION "ERROR"
6465
DEPENDS applications-scheduler-build
6566
RESOURCE_LOCK libscip
6667
)

examples/Binpacking/check/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ foreach(instance ${instances})
4040
set_tests_properties("examples-binpacking-${basename}"
4141
PROPERTIES
4242
PASS_REGULAR_EXPRESSION "Validation : Success"
43+
FAIL_REGULAR_EXPRESSION "ERROR"
4344
DEPENDS examples-binpacking-build
4445
RESOURCE_LOCK libscip
4546
)

examples/CallableLibrary/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ macro(addbuildandtest target)
6060
)
6161
set_tests_properties(examples-callablelibrary_${target}
6262
PROPERTIES
63+
FAIL_REGULAR_EXPRESSION "ERROR"
6364
DEPENDS examples-callablelibrary_${target}-build
6465
)
6566
if(WIN32)

examples/Eventhdlr/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ foreach(instance ${instances})
7777
set_tests_properties(examples-eventhdlr-${basename}
7878
PROPERTIES
7979
PASS_REGULAR_EXPRESSION "Validation : Success"
80+
FAIL_REGULAR_EXPRESSION "ERROR"
8081
DEPENDS examples-eventhdlr-build
8182
)
8283
if(WIN32)

examples/GMI/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ foreach(instance ${instances})
8282
)
8383
set_tests_properties(examples-gmi-${setting}-${basename}
8484
PROPERTIES
85+
FAIL_REGULAR_EXPRESSION "ERROR"
8586
DEPENDS examples-gmi-build
8687
)
8788
if(WIN32)

examples/LOP/check/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ foreach(instance ${instances})
4444
set_tests_properties(examples-lop-${basename}
4545
PROPERTIES
4646
PASS_REGULAR_EXPRESSION "Validation : Success"
47+
FAIL_REGULAR_EXPRESSION "ERROR"
4748
DEPENDS examples-lop-build
4849
RESOURCE_LOCK libscip
4950
)

examples/Queens/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ foreach(n ${nSet})
5454
)
5555
set_tests_properties(examples-queens-${n}
5656
PROPERTIES
57+
FAIL_REGULAR_EXPRESSION "ERROR"
5758
DEPENDS examples-queens-build
5859
)
5960
if(WIN32)

examples/Relaxator/check/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,10 @@ foreach(instance ${instances})
4646
)
4747
set_tests_properties(examples-relaxator-${basename}
4848
PROPERTIES
49-
DEPENDS examples-relaxator-build
50-
RESOURCE_LOCK libscip
49+
PASS_REGULAR_EXPRESSION "Validation : Success"
50+
FAIL_REGULAR_EXPRESSION "ERROR"
51+
DEPENDS examples-relaxator-build
52+
RESOURCE_LOCK libscip
5153
)
5254
if(WIN32)
5355
# on windows we need to execute the application and examples executables from the directory containing the libscip.dll,

examples/SCFLP/check/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ foreach(instance ${instances})
4343
set_tests_properties("examples-scflp-${basename}"
4444
PROPERTIES
4545
PASS_REGULAR_EXPRESSION "Validation : Success"
46+
FAIL_REGULAR_EXPRESSION "ERROR"
4647
DEPENDS examples-scflp-build
4748
RESOURCE_LOCK libscip
4849
)

examples/TSP/check/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ foreach(instance ${instances})
4343
set_tests_properties(examples-tsp-${basename}
4444
PROPERTIES
4545
PASS_REGULAR_EXPRESSION "Validation : Success"
46+
FAIL_REGULAR_EXPRESSION "ERROR"
4647
DEPENDS examples-tsp-build
4748
RESOURCE_LOCK libscip
4849
)

examples/VRP/check/CMakeLists.txt

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ include(CTest)
33
# define the instance sets
44
#
55
# semicolon '\;' is used to split an instance and its optimal objective value
6+
# and its optimal value minus one
67
# For infeasible instances, '+infinity' is used (or '-infinity' in case of maximization)
78
#
89
set(instances
9-
"eil13\;247"
10-
# "eil22\;375"
10+
"eil13\;2.47\;2.46"
11+
# "eil22\;3.75\;3.74"
1112
# this instance takes too long
12-
"eil7\;104"
13+
"eil7\;1.04\;1.03"
1314
)
1415

1516
#
@@ -31,15 +32,18 @@ set_tests_properties(examples-vrp-build
3132
#
3233
foreach(instance ${instances})
3334
#
34-
# treat the instance as a tuple (list) of two values
35+
# treat the instance as a tuple (list) of three values
3536
#
3637
list(GET instance 0 basename)
3738
list(GET instance 1 optval)
38-
add_test(NAME examples-vrp-${basename}
39+
list(GET instance 2 optvalminusone)
40+
add_test(NAME "examples-vrp-${basename}"
3941
COMMAND $<TARGET_FILE:vrp> ${CMAKE_CURRENT_SOURCE_DIR}/../data/${basename}.vrp
4042
)
41-
set_tests_properties(examples-vrp-${basename}
43+
set_tests_properties("examples-vrp-${basename}"
4244
PROPERTIES
45+
PASS_REGULAR_EXPRESSION "Primal Bound : \\+(${optval}000000*|${optvalminusone}999999*)e\\+02"
46+
FAIL_REGULAR_EXPRESSION "ERROR"
4347
DEPENDS examples-vrp-build
4448
RESOURCE_LOCK libscip
4549
)

0 commit comments

Comments
 (0)