suite_bench: add bench input skip/ignore/blacklist
some benchmark input files have different output from reference implementation, ignore them for now in order to allow testing for regressions for the currently passing inputs. run ignored tests with cargo test --features=suite_bench -- --ignored
This commit is contained in:
parent
c3ff064c78
commit
38666a86f8
2 changed files with 16 additions and 11 deletions
|
@ -10,17 +10,19 @@ mod.rs: ${TEST_DJ} html
|
|||
echo "use crate::suite_test;" > $@
|
||||
for name in ${TEST}; do \
|
||||
name_snake=$$(basename -a $$name | sed 's/-/_/g'); \
|
||||
echo "#[test]" >> $@; \
|
||||
echo "fn test_$$name_snake() {" >> $@; \
|
||||
printf ' let src = r###"' >> $@; \
|
||||
cat $$name.dj >> $@; \
|
||||
echo '"###;' >> $@; \
|
||||
printf ' let expected = r###"' >> $@; \
|
||||
cat $$name.html >> $@; \
|
||||
echo '"###;' >> $@; \
|
||||
echo " suite_test!(src, expected);" >> $@; \
|
||||
echo "}" >> $@; \
|
||||
done
|
||||
skip_reason=$$(grep -E "^$${name_snake}:" skip | cut -d: -f2); \
|
||||
[ -n "$$skip_reason" ] && echo "#[ignore = \"$${skip_reason}\"]"; \
|
||||
echo "#[test]"; \
|
||||
echo "fn $$name_snake() {"; \
|
||||
printf ' let src = r###"'; \
|
||||
cat $$name.dj; \
|
||||
echo '"###;'; \
|
||||
printf ' let expected = r###"'; \
|
||||
cat $$name.html; \
|
||||
echo '"###;'; \
|
||||
echo " suite_test!(src, expected);"; \
|
||||
echo "}"; \
|
||||
done >> $@
|
||||
|
||||
html: djot-js ${TEST_DJ}
|
||||
echo ${TEST}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue