2021-05-23 05:19:11 +03:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
#
|
2022-09-19 11:25:49 +03:00
|
|
|
# This script updates passing.txt and TODO.txt
|
2021-05-23 05:19:11 +03:00
|
|
|
#
|
|
|
|
#
|
|
|
|
# Note that even if a test is ignored, this script will invoke it.
|
|
|
|
#
|
|
|
|
set -eu
|
|
|
|
|
2022-04-24 15:11:02 +03:00
|
|
|
function sortFile() {
|
|
|
|
cat $1 | awk NF | sort | uniq | awk '{$1=$1};1' | uniq | sort > tests/sorted.txt
|
|
|
|
mv tests/sorted.txt $1
|
|
|
|
}
|
2021-05-23 05:19:11 +03:00
|
|
|
|
|
|
|
# Clean the ignore list
|
2022-02-28 16:49:10 +03:00
|
|
|
echo '' > tests/TODO.txt
|
2022-09-19 11:25:49 +03:00
|
|
|
echo '' > tests/passing.txt
|
2022-04-24 15:11:02 +03:00
|
|
|
mv tests/postponed.txt tests/postponed.tmp.txt
|
|
|
|
echo '' > tests/postponed.txt
|
2021-05-23 05:19:11 +03:00
|
|
|
|
2022-04-28 08:19:08 +03:00
|
|
|
export SWC_RUN=0
|
2022-04-28 11:32:03 +03:00
|
|
|
export SWC_CHECK=0
|
2022-04-23 16:40:28 +03:00
|
|
|
|
2022-09-19 11:25:49 +03:00
|
|
|
# Update passing.txt
|
2022-08-03 07:05:56 +03:00
|
|
|
cargo test --features concurrent --test compress fixture_tests__terser__compress__ \
|
2022-04-23 16:40:28 +03:00
|
|
|
| grep 'fixture_tests__terser__compress__' \
|
|
|
|
| grep 'js .\.\. ok$' \
|
|
|
|
| sed -e 's!test fixture_tests__terser__compress__!!' \
|
|
|
|
| sed -e 's! ... ok!!' \
|
|
|
|
| sed -e 's!__!/!g' \
|
|
|
|
| sed -e 's!_js!.js!' \
|
2022-09-19 11:25:49 +03:00
|
|
|
>> tests/passing.txt
|
2022-04-23 16:40:28 +03:00
|
|
|
|
2022-09-19 11:25:49 +03:00
|
|
|
sortFile tests/passing.txt
|
2022-04-24 15:11:02 +03:00
|
|
|
|
|
|
|
# Don't mark passing tests as postponed
|
2022-09-19 11:25:49 +03:00
|
|
|
comm -23 tests/postponed.tmp.txt tests/passing.txt > tests/nodup.txt
|
2022-04-24 15:11:02 +03:00
|
|
|
mv tests/nodup.txt tests/postponed.txt
|
|
|
|
rm tests/postponed.tmp.txt
|
|
|
|
|
|
|
|
sortFile tests/postponed.txt
|
|
|
|
|
2022-04-23 16:40:28 +03:00
|
|
|
# Update TODO.txt
|
2022-08-03 07:05:56 +03:00
|
|
|
cargo test --features concurrent --test compress 'fixture_tests__terser__compress__' \
|
2022-04-23 16:40:28 +03:00
|
|
|
| grep 'fixture_tests__terser__compress__' \
|
|
|
|
| grep 'js .\.\. FAILED$' \
|
|
|
|
| sed -e 's!test fixture_tests__terser__compress__!!' \
|
|
|
|
| sed -e 's! ... FAILED!!' \
|
|
|
|
| sed -e 's!__!/!g' \
|
|
|
|
| sed -e 's!_js!.js!' \
|
|
|
|
>> tests/TODO.txt
|
|
|
|
|
2022-04-24 15:11:02 +03:00
|
|
|
sortFile tests/TODO.txt
|
|
|
|
|
|
|
|
# Don't mark postponed test as todo
|
|
|
|
comm -23 tests/TODO.txt tests/postponed.txt > tests/nodup.txt
|
|
|
|
mv tests/nodup.txt tests/TODO.txt
|
|
|
|
|