Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/v9-minor'
Browse files Browse the repository at this point in the history
  • Loading branch information
scip-ci committed Nov 4, 2024
2 parents d9a805e + b60f02d commit 04b02ee
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/scip/presol_milp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,9 @@ SCIP_DECL_PRESOLEXEC(presolExecMILP)
*/
if( SCIPvarGetStatus(varx) == SCIP_VARSTATUS_FIXED && SCIPvarGetStatus(vary) == SCIP_VARSTATUS_FIXED )
{
assert(false);
SCIPdebugMsg(scip, "Aggregation of <%s> and <%s> rejected because they are already fixed.\n",
SCIPvarGetName(varx), SCIPvarGetName(vary));

break;
}

Expand Down Expand Up @@ -804,7 +806,9 @@ SCIP_DECL_PRESOLEXEC(presolExecMILP)
*/
if( SCIPvarGetStatus(aggrvar) == SCIP_VARSTATUS_FIXED )
{
assert(false);
SCIPdebugMsg(scip, "Multi-aggregation of <%s> rejected because it is already fixed.\n",
SCIPvarGetName(aggrvar));

break;
}

Expand Down
33 changes: 33 additions & 0 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ Here are some test examples that can help you get started writing unit tests.

## Compile

### With the `Makefile` System

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.

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

**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`.

### With the CMake System

Create a build directory and build the unittests
```bash
mkdir build
cd build
cmake .. YOUR_CMAKE_CONFIGURATION
make unittests -j
```

There's a target for each test file, that's generated by cmake if you would like to compile only one test.
For example,
```bash
make unittest-scip-stages -j
```
To compile the `stages.c` test file in `tests/scip` directory.

## Run

### With the Makefile System

See above for the easiest way to compile and run tests. For simply running tests:

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

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

### With the CMake System

To run all tests:
```
ctest
```

To run tests with pattern filter:
```
ctest -R FILTER_PATTERN
```

## Debug (up to Criterion 2.2.2)

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

0 comments on commit 04b02ee

Please sign in to comment.