-
Notifications
You must be signed in to change notification settings - Fork 22
More tests (or rather, examples) #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More tests (or rather, examples) #39
Conversation
83bdc38 to
d943d04
Compare
|
d943d04 to
86f5f7f
Compare
|
(edit) re-runしたら普通にパスしました。何だったんでしょう..? |
33bd7e5 to
77803d7
Compare
|
|
368229a to
bb7e640
Compare
|
サンプルテストケースをこのリポジトリに持たないようにしました。 ↓のようなBashスクリプトを入れるつもりでしたが折角なので #!/bin/bash
set -o pipefail
type jq > /dev/null || exit 1 # `$ sudo apt install jq`
type python3 > /dev/null || exit 1
# - https://github.com/kmyk/online-judge-tools
# - https://github.com/dbohdan/remarshal
if [ ! -d ./target/test-with-generated-opts/venvs/oj ]; then
python3 -m venv ./target/test-with-generated-opts/venvs/oj &&
./target/test-with-generated-opts/venvs/oj/bin/pip3 install -U pip || exit 1
fi
if [ ! -d ./target/test-with-generated-opts/venvs/remarshal ]; then
python3 -m venv ./target/test-with-generated-opts/venvs/remarshal &&
./target/test-with-generated-opts/venvs/remarshal/bin/pip3 install -U pip || exit 1
fi
./target/test-with-generated-opts/venvs/oj/bin/pip3 install -U online-judge-tools || exit 1
./target/test-with-generated-opts/venvs/remarshal/bin/pip3 install -U remarshal || exit 1
rm -rf ./target/test-with-generated-opts/testcases
true > ./target/test-with-generated-opts/testcases/apg4b-a/in/1.txt
echo 'Hello, World!' > ./target/test-with-generated-opts/testcases/apg4b-a/out/1.txt
./target/test-with-generated-opts/venvs/remarshal/bin/remarshal -i ./test-with-generated-opts.toml --of json |
jq -r '.examples | to_entries[] | select(.key != "apg4b-a") | "-d ./target/test-with-generated-opts/testcases/" + .key + " " + .value.url' |
xargs -t -n3 ./target/test-with-generated-opts/venvs/oj/bin/oj d -f %e/%i.txt || exit 1 |
|
bin = "./target/test-with-generated-opts/bin/{}"
testcases = "./target/test-with-generated-opts/testcases/{}.json"
[examples.abc054-c]
name = "ABC054: C - One-stroke Path"
url = "https://atcoder.jp/contests/abc054/tasks/abc054_c"
matching = "Words" |
a089fdd to
95f748d
Compare
|
手元でDropboxのやつが入れにくいのでJSONからテキストファイルに戻しました。 |
a89ba00 to
2cbcf35
Compare
e060343 to
d194941
Compare
10a178a to
4ae0c3c
Compare
4ae0c3c to
f204639
Compare
f50ba72 to
915f859
Compare
915f859 to
211ceb2
Compare
5b5a6c2 to
2605317
Compare
5a1f6b6 to
25170f6
Compare
25170f6 to
5340eed
Compare
|
リジェクトされたクレートをexamplesから外したので |
No description provided.