Change status messages in runners
This commit is contained in:
parent
952b1dce9a
commit
d70b5f53e5
4 changed files with 15 additions and 2 deletions
|
@ -68,7 +68,7 @@ func run() error {
|
|||
setupTestTasks(challengeInfo, runner, &lookupTable)
|
||||
setupMainTasks(challengeInputString, runner, &lookupTable)
|
||||
|
||||
fmt.Println("\nRunning...\n")
|
||||
fmt.Println()
|
||||
|
||||
r, cleanupFn := runner.Run()
|
||||
for roe := range r {
|
||||
|
|
|
@ -71,6 +71,9 @@ func (g *golangRunner) Run() (chan ResultOrError, func()) {
|
|||
return makeErrorChan(err), nil
|
||||
}
|
||||
|
||||
fmt.Print("Compiling...\r")
|
||||
defer fmt.Print("\n\n")
|
||||
|
||||
// compile executable
|
||||
stderrBuffer := new(bytes.Buffer)
|
||||
|
||||
|
@ -90,6 +93,8 @@ func (g *golangRunner) Run() (chan ResultOrError, func()) {
|
|||
return makeErrorChan(err), nil
|
||||
}
|
||||
|
||||
fmt.Print("Running... ")
|
||||
|
||||
// run executable
|
||||
cmd = exec.Command(absExecPath)
|
||||
cmd.Dir = g.dir
|
||||
|
|
|
@ -52,6 +52,9 @@ func (n *nimRunner) Run() (chan ResultOrError, func()) {
|
|||
return makeErrorChan(err), nil
|
||||
}
|
||||
|
||||
fmt.Print("Compiling...\r")
|
||||
defer fmt.Print("\n\n")
|
||||
|
||||
// compile
|
||||
stderrBuffer := new(bytes.Buffer)
|
||||
cmd := exec.Command(nimInstallation, "compile", "-o:"+executableFilepath, "-d:release", wrapperFilepath)
|
||||
|
@ -65,6 +68,8 @@ func (n *nimRunner) Run() (chan ResultOrError, func()) {
|
|||
return makeErrorChan(errors.New("compilation failed, hence cannot continue")), nil
|
||||
}
|
||||
|
||||
fmt.Print("Running... ")
|
||||
|
||||
absExecPath, err := filepath.Abs(executableFilepath)
|
||||
if err != nil {
|
||||
return makeErrorChan(err), nil
|
||||
|
|
|
@ -4,6 +4,7 @@ import (
|
|||
"bytes"
|
||||
_ "embed"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
|
@ -54,9 +55,11 @@ func (p *pythonRunner) Run() (chan ResultOrError, func()) {
|
|||
|
||||
pythonPathVar := filepath.Join(cwd, "lib")
|
||||
|
||||
fmt.Println("Running...")
|
||||
|
||||
// Run Python and gather output
|
||||
cmd := exec.Command(python3Installation, "-B", wrapperFilename) // -B prevents .pyc files from being written
|
||||
cmd.Env = append(cmd.Env, "PYTHONPATH="+pythonPathVar) // this allows the aocpy lib to be imported
|
||||
cmd.Env = append(cmd.Env, "PYTHONPATH="+pythonPathVar) // this allows the aocpy lib to be imported
|
||||
cmd.Dir = p.dir
|
||||
|
||||
cmd.Stdin = bytes.NewReader(append(taskJSON, '\n'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue