Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
infogulch committed Jul 3, 2024
1 parent 26e2983 commit 91e8860
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions make_tool.cue
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,17 @@ task: run: {
mklog: file.Create & {filename: "\(vars.testdir)/xtemplate.log", contents: ""}

ready: exec.Run & {
$dep: mklog.$done
$after: mklog
cmd: ["bash", "-c", "grep 'starting server' <(tail -f \(mklog.filename))"]
}

display: exec.Run & {
$after: mklog
cmd: ["echo", "grep 'starting server' <(tail -f \(mklog.filename))"]
}

start: exec.Run & {
$dep: mkdataw.$done && mklog.$done && gobuild.$done
$after: [mkdataw, mklog, gobuild]
cmd: ["bash", "-c", "./xtemplate --loglevel -4 -d DB:sql:sqlite3:file:./dataw/test.sqlite -d FS:fs:./data --config-file config.json >\(mklog.filename) 2>&1"]
dir: vars.testdir
}
Expand Down Expand Up @@ -185,7 +190,7 @@ command: ci: {

gotest: task.gotest & {"vars": cfg.vars}

run: task.run & {"vars": cfg.vars}
run: task.run & {"vars": cfg.vars, start: mustSucceed: true}
test: task.test & {"vars": cfg.vars, hurl: $dep: run.ready.$done}
kill: exec.Run & {cmd: "pkill xtemplate", $dep: test.hurl.$done} // better way?

Expand Down

0 comments on commit 91e8860

Please sign in to comment.