Skip to content

Commit 04b02ee

Browse files
committed
Merge remote-tracking branch 'origin/v9-minor'
2 parents d9a805e + b60f02d commit 04b02ee

File tree

2 files changed

+39
-2
lines changed

2 files changed

+39
-2
lines changed

Diff for: src/scip/presol_milp.cpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,9 @@ SCIP_DECL_PRESOLEXEC(presolExecMILP)
760760
*/
761761
if( SCIPvarGetStatus(varx) == SCIP_VARSTATUS_FIXED && SCIPvarGetStatus(vary) == SCIP_VARSTATUS_FIXED )
762762
{
763-
assert(false);
763+
SCIPdebugMsg(scip, "Aggregation of <%s> and <%s> rejected because they are already fixed.\n",
764+
SCIPvarGetName(varx), SCIPvarGetName(vary));
765+
764766
break;
765767
}
766768

@@ -804,7 +806,9 @@ SCIP_DECL_PRESOLEXEC(presolExecMILP)
804806
*/
805807
if( SCIPvarGetStatus(aggrvar) == SCIP_VARSTATUS_FIXED )
806808
{
807-
assert(false);
809+
SCIPdebugMsg(scip, "Multi-aggregation of <%s> rejected because it is already fixed.\n",
810+
SCIPvarGetName(aggrvar));
811+
808812
break;
809813
}
810814

Diff for: tests/README.md

+33
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ Here are some test examples that can help you get started writing unit tests.
3333

3434
## Compile
3535

36+
### With the `Makefile` System
37+
3638
Smart test discovery is already built into the `Makefile`, so anything in `src` (at any level of nesting) will be detected and compiled into the equivalent path in the `bin` directory. Also, the `Makefile` generates the test "makefile" for `ctest`. There should never be a reason to directly modify any Makefile unless you are hacking on the SCIP Unit Test Suite.
3739

3840
The easiest way to compile and run the tests is:
@@ -54,8 +56,27 @@ Go to `Criterion/dependencies/klib` and execute `git co cdb7e92` and then go to
5456

5557
**NOTE** Some tests might need to include c files from SCIP. For tests to be recompilied the included c file gets recompiled, run `make depend`.
5658

59+
### With the CMake System
60+
61+
Create a build directory and build the unittests
62+
```bash
63+
mkdir build
64+
cd build
65+
cmake .. YOUR_CMAKE_CONFIGURATION
66+
make unittests -j
67+
```
68+
69+
There's a target for each test file, that's generated by cmake if you would like to compile only one test.
70+
For example,
71+
```bash
72+
make unittest-scip-stages -j
73+
```
74+
To compile the `stages.c` test file in `tests/scip` directory.
75+
5776
## Run
5877

78+
### With the Makefile System
79+
5980
See above for the easiest way to compile and run tests. For simply running tests:
6081

6182
```
@@ -90,6 +111,18 @@ Alternatively, one can disable ASLR system-wide (requires root access):
90111

91112
TODO: Define a policy for moving/removing tests in `src/bugs` once the bugs are fixed.
92113

114+
### With the CMake System
115+
116+
To run all tests:
117+
```
118+
ctest
119+
```
120+
121+
To run tests with pattern filter:
122+
```
123+
ctest -R FILTER_PATTERN
124+
```
125+
93126
## Debug (up to Criterion 2.2.2)
94127

95128
If a test fails, use `gdb` to debug. For example:

0 commit comments

Comments
 (0)