File tree 5 files changed +62
-3
lines changed
5 files changed +62
-3
lines changed Original file line number Diff line number Diff line change 1
1
/target /
2
2
/build /
3
3
/dist
4
+ /test /dist
4
5
.idea /
5
6
.DS_Store
6
7
* .log
Original file line number Diff line number Diff line change @@ -3,7 +3,8 @@ FROM $IMAGE
3
3
4
4
ENV OPENSSL_STATIC=1 \
5
5
OPENSSL_LIB_DIR=/usr/lib/x86_64-linux-gnu \
6
- OPENSSL_INCLUDE_DIR=/usr/include/openssl
6
+ OPENSSL_INCLUDE_DIR=/usr/include/openssl \
7
+ TEST_MANAGER_STATIC=1
7
8
8
9
RUN rustup target add x86_64-pc-windows-gnu
9
10
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -eu
4
+
5
+ # Build `test-manager`
6
+ SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
7
+ TEST_FRAMEWORK_ROOT=" $SCRIPT_DIR /.."
8
+ REPO_DIR=" $TEST_FRAMEWORK_ROOT /.."
9
+
10
+ # shellcheck disable=SC1091
11
+ source " $REPO_DIR /scripts/utils/log"
12
+
13
+ build_linux () {
14
+ cd " $TEST_FRAMEWORK_ROOT "
15
+ # Build the test manager
16
+ cargo build -p test-manager --release
17
+ }
18
+
19
+ case ${1-: " " } in
20
+ linux)
21
+ build_linux
22
+ shift
23
+ ;;
24
+ * )
25
+ log_error " Invalid platform. Specify a valid platform as first argument"
26
+ exit 1
27
+ esac
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -eu
4
+
5
+ # Build distributable binaries for the test framework.
6
+ # TODO: Support macOS
7
+
8
+ SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
9
+ TEST_FRAMEWORK_ROOT=" $SCRIPT_DIR /.."
10
+
11
+ # Build
12
+ build_linux () {
13
+ mkdir -p " $TEST_FRAMEWORK_ROOT /dist"
14
+ # Build the test manager
15
+ " $SCRIPT_DIR /build-manager.sh" linux
16
+ cp " $TEST_FRAMEWORK_ROOT /target/release/test-manager" " $TEST_FRAMEWORK_ROOT /dist/"
17
+
18
+ # Build the test runner
19
+ " $SCRIPT_DIR /build-runner.sh" linux
20
+ cp " $TEST_FRAMEWORK_ROOT /target/x86_64-unknown-linux-gnu/release/test-runner" " $TEST_FRAMEWORK_ROOT /dist/"
21
+ cp " $TEST_FRAMEWORK_ROOT /target/x86_64-unknown-linux-gnu/release/connection-checker" " $TEST_FRAMEWORK_ROOT /dist/"
22
+ }
23
+
24
+ build_linux
Original file line number Diff line number Diff line change
1
+ use std:: env:: var;
2
+
1
3
fn main ( ) {
2
4
// Rebuild if SSH provision script changes
3
5
println ! ( "cargo::rerun-if-changed=../scripts/ssh-setup.sh" ) ;
4
6
5
- println ! ( "cargo::rustc-link-search=native=/usr/lib/x86_64-linux-gnu" ) ;
6
- println ! ( "cargo::rustc-link-lib=static=pcap" ) ;
7
+ let link_statically = var ( "TEST_MANAGER_STATIC" ) . is_ok_and ( |x| x != "0" ) ;
8
+
9
+ if link_statically {
10
+ println ! ( "cargo::rustc-link-search=native=/usr/lib/x86_64-linux-gnu" ) ;
11
+ println ! ( "cargo::rustc-link-lib=static=pcap" ) ;
12
+ }
7
13
}
You can’t perform that action at this time.
0 commit comments