commit
7a55e9c5f1
2 changed files with 17 additions and 2 deletions
15
ci/e2ereport.sh
Executable file
15
ci/e2ereport.sh
Executable file
|
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
export REPORT_OUTPUT="out/e2e_report.html"
|
||||||
|
rm -f $REPORT_OUTPUT
|
||||||
|
|
||||||
|
FORCE_COLOR=1 DEBUG=1 go run ./e2etests/report/main.go "$@";
|
||||||
|
|
||||||
|
if [ -z "${NO_OPEN:-}" ]; then
|
||||||
|
if [ -s "$REPORT_OUTPUT" ]; then
|
||||||
|
open "$REPORT_OUTPUT"
|
||||||
|
else
|
||||||
|
echo "The report is empty"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
@ -140,10 +140,10 @@ func main() {
|
||||||
Tests: tests,
|
Tests: tests,
|
||||||
}
|
}
|
||||||
|
|
||||||
path := "e2e_report.html"
|
path := os.Getenv("REPORT_OUTPUT")
|
||||||
f, err := os.Create(path)
|
f, err := os.Create(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(fmt.Errorf("error creating file `%s`. %v", path, err))
|
||||||
}
|
}
|
||||||
if err := tmpl.Execute(f, tmplData); err != nil {
|
if err := tmpl.Execute(f, tmplData); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue