This repository has been archived by the owner on Dec 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
13 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,21 @@ | ||
# judger-test-collection | ||
# Judger Test Collection | ||
|
||
## How to use test collection | ||
This repository is gaining problem test cases for OJ Lab. | ||
|
||
As of now, all executables need to be built prior to testing. | ||
## How to use test collection | ||
|
||
use GNU make: | ||
As of now, all executables need to be built prior to testing: | ||
|
||
```bash | ||
mkdir -p {build,dist} | ||
cmake -B build --install-prefix $(pwd)/dist | ||
mkdir -p build dist | ||
# GNU make | ||
cmake -B build --install-prefix "$(pwd)/dist" | ||
# # Ninja | ||
# cmake -B build --install-prefix $(pwd)/dist -G Ninja . | ||
cmake --build build --parallel | ||
cmake --install build | ||
``` | ||
|
||
or use Ninja: | ||
|
||
```bash | ||
mkdir -p {build,dist} | ||
cmake -B build --install-prefix $(pwd)/dist -G Ninja . | ||
cmake --build build | ||
cmake --install build | ||
``` | ||
Or you should try `./build.sh` to help you do this. | ||
|
||
Then you will get all test file on `dist/` | ||
|
||
## Trouble Shooting | ||
|
||
You might get errors like: | ||
`g++: error: unrecognized command line option ‘-std=gnu++20’; did you mean ‘-std=gnu++2a’?` | ||
While running the provided bash in this repository. | ||
|
||
For resolution run the following commands if you are using Ubuntu in Github Codespaces: | ||
|
||
``` sh | ||
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | ||
sudo apt install -y g++-11 | ||
# Alternate the priority of g++ version usage | ||
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 100 | ||
``` | ||
Then you will get all test file on `dist/`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/sh -e | ||
|
||
mkdir -p {build,dist} | ||
cmake -B build --install-prefix $(pwd)/dist | ||
mkdir -p build dist | ||
cmake -B build --install-prefix "$(pwd)/dist" | ||
cmake --build build --parallel | ||
cmake --install build |
Binary file not shown.
Binary file not shown.