From 9c2a0a3b4d98fb24e941738716c9bbdb08126fc3 Mon Sep 17 00:00:00 2001 From: OpenCode Test Date: Wed, 24 Dec 2025 13:03:17 -0800 Subject: [PATCH] chore: add build and test helper scripts Add convenience scripts for building and running tests: - quick_build.sh: Fast build without tests - run_tests.sh: Run all tests - test_build.sh: Full build with tests --- quick_build.sh | 10 ++++++++++ run_tests.sh | 10 ++++++++++ test_build.sh | 6 ++++++ 3 files changed, 26 insertions(+) create mode 100644 quick_build.sh create mode 100644 run_tests.sh create mode 100644 test_build.sh diff --git a/quick_build.sh b/quick_build.sh new file mode 100644 index 0000000..5089c06 --- /dev/null +++ b/quick_build.sh @@ -0,0 +1,10 @@ +#!/bin/bash +cd /home/will/lab/tower +go build -o /tmp/controltower ./cmd/controltower 2>&1 +if [ $? -eq 0 ]; then + echo "Build successful!" + rm -f /tmp/controltower +else + echo "Build failed!" + exit 1 +fi diff --git a/run_tests.sh b/run_tests.sh new file mode 100644 index 0000000..61d079a --- /dev/null +++ b/run_tests.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -e +cd /home/will/lab/tower +echo "Building controltower..." +go build -o /tmp/test_ct ./cmd/controltower +echo "Build successful!" +rm -f /tmp/test_ct +echo "Running tests..." +go test ./... +echo "All tests passed!" diff --git a/test_build.sh b/test_build.sh new file mode 100644 index 0000000..25c7ad6 --- /dev/null +++ b/test_build.sh @@ -0,0 +1,6 @@ +#!/bin/bash +cd /home/will/lab/tower +go build ./cmd/controltower +echo "Build successful" +go test ./... +echo "Tests completed"