Skip to content

Commit 4d8b496

Browse files
committed
adj tests switch
1 parent a7351bc commit 4d8b496

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

backend/cmd/config.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77

88
type Adj struct {
99
Branch string
10+
Test bool
1011
}
1112

1213
type Network struct {
@@ -16,6 +17,6 @@ type Network struct {
1617
type Config struct {
1718
Vehicle vehicle.Config
1819
Server server.Config
19-
Network Network
2020
Adj Adj
21+
Network Network
2122
}

backend/cmd/config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ manual = false
2121

2222
[adj]
2323
branch = "sw-bcu" # Leave blank when using ADJ as a submodule (like this: "")
24+
test = true

backend/cmd/main.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,13 @@ func main() {
107107
trace.Fatal().Err(err).Msg("setting up ADJ")
108108
}
109109

110-
test := exec.Command("python3", "testadj.py")
111-
out, err := test.CombinedOutput()
112-
if err != nil || len(out) != 0 {
113-
fmt.Printf("\nPython test failed:\nError: %v\nOutput: %s\n", err, string(out))
114-
os.Exit(1)
110+
if config.Adj.Test {
111+
test := exec.Command("python3", "testadj.py")
112+
out, err := test.CombinedOutput()
113+
if err != nil || len(out) != 0 {
114+
fmt.Printf("\nPython test failed:\nError: %v\nOutput: %s\n", err, string(out))
115+
os.Exit(1)
116+
}
115117
}
116118

117119
podData, err := pod_data.NewPodData(adj.Boards, adj.Info.Units)

0 commit comments

Comments
 (0)