Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions backend/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"net/http"
_ "net/http/pprof"
"os"
"os/exec"
"os/signal"
"path"
"runtime"
Expand Down Expand Up @@ -107,15 +106,6 @@ func main() {
trace.Fatal().Err(err).Msg("setting up ADJ")
}

if config.Adj.Test {
test := exec.Command("python3", "testadj.py")
out, err := test.CombinedOutput()
if err != nil || len(out) != 0 {
fmt.Printf("\nPython test failed:\nError: %v\nOutput: %s\n", err, string(out))
os.Exit(1)
}
}

podData, err := pod_data.NewPodData(adj.Boards, adj.Info.Units)
if err != nil {
fmt.Println(err)
Expand Down
9 changes: 9 additions & 0 deletions backend/internal/adj/adj.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ package adj

import (
"encoding/json"
"log"
"os"
"os/exec"

"github.com/HyperloopUPV-H8/h9-backend/internal/utils"
)
Expand Down Expand Up @@ -71,6 +73,13 @@ func downloadADJ(AdjBranch string) (json.RawMessage, json.RawMessage, error) {
updateRepo(AdjBranch)

// The BoardIds are applied in the NewADJ function by the getBoardIds function
//Execute the script testadj.py (fix bug)
test := exec.Command("python3", "testadj.py")
out, err := test.CombinedOutput()
if err != nil || len(out) != 0 {
log.Fatalf("python test failed:\nError: %v\nOutput: %s\n", err, string(out))
}

info, err := os.ReadFile(RepoPath + "general_info.json")
if err != nil {
return nil, nil, err
Expand Down
Loading