generated from ossf/project-template
-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve how labs are tested. Change how the "examples" are used in the hint section so that people provide full examples up to the tested index, and *document* this (before it wasn't clear how do this). By using this approach we will *consistently* test hints. In the longer term, we might remove the constraint on which hints are returned during the testing, but that requires determining which forms cover which indexes, which is more complex. By asking for the fields now, we make it easier to make that change later. This makes changes in labs to *use* the new testing mechanism in hint examples. This also adds the script "mass-test", which automatically tests all labs. It does this by opening them all in the web browser, triggering the self-test in each lab. You have to manually look at each page, which is a little annoying. That said, that takes very little time. Automatically opening every page is a big improvement in terms of automated testing. Signed-off-by: David A. Wheeler <[email protected]>
- Loading branch information
1 parent
bc19c91
commit f16ec85
Showing
6 changed files
with
110 additions
and
38 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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
|
||
# Mass open all lab files. Do this by opening every lab in a web browser, | ||
# which will invoke each lab's built-in tests. | ||
|
||
# Create a list of labs | ||
grep -o '[A-Za-z0-9_-]*\.html' README.md | sort |uniq > ,1 | ||
|
||
OPENER=xdg-open | ||
if ! which "$OPENER" >/dev/null; then | ||
OPENER=open | ||
fi | ||
|
||
for file in $(cat ,1); do | ||
${OPENER} "$file" | ||
done | ||
|
||
echo 'Check each lab file to ensure there are no error alerts and that' | ||
echo 'there is a yellow field for input.' |
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