From ecae9a21097e64fa1e9ace4d891dcc0d5b66f30f Mon Sep 17 00:00:00 2001 From: Matt <1009003+tantaman@users.noreply.github.com> Date: Fri, 15 Sep 2023 14:35:31 -0400 Subject: [PATCH] crate type swap on rs integration testing We need to be able to do this: https://github.com/rust-lang/rust/issues/20267 --- .github/workflows/rs-tests.yml | 2 +- .github/workflows/rs-valgrind.yml | 2 +- core/rs/integration-check/test-valgrind.sh | 3 +++ core/rs/integration-check/test.sh | 3 +++ core/src/util.h | 1 + 5 files changed, 9 insertions(+), 2 deletions(-) create mode 100755 core/rs/integration-check/test-valgrind.sh create mode 100755 core/rs/integration-check/test.sh diff --git a/.github/workflows/rs-tests.yml b/.github/workflows/rs-tests.yml index 62eed8991..397aab2a0 100644 --- a/.github/workflows/rs-tests.yml +++ b/.github/workflows/rs-tests.yml @@ -37,7 +37,7 @@ jobs: - name: Integration Tests run: | cd core/rs/integration-check - cargo test + ./test.sh - name: Test Core run: | diff --git a/.github/workflows/rs-valgrind.yml b/.github/workflows/rs-valgrind.yml index 479503aa4..41acf7519 100644 --- a/.github/workflows/rs-valgrind.yml +++ b/.github/workflows/rs-valgrind.yml @@ -35,7 +35,7 @@ jobs: - name: Integration Tests run: | cd core/rs/integration-check - cargo valgrind test + ./test-valgrind.sh - name: Test Core run: | diff --git a/core/rs/integration-check/test-valgrind.sh b/core/rs/integration-check/test-valgrind.sh new file mode 100755 index 000000000..42e57f12e --- /dev/null +++ b/core/rs/integration-check/test-valgrind.sh @@ -0,0 +1,3 @@ +sed -i .bk 's/crate-type = \["staticlib"\]/crate-type = \["rlib"\]/' ../bundle/Cargo.toml +cargo valgrind test +mv ../bundle/Cargo.toml.bk ../bundle/Cargo.toml diff --git a/core/rs/integration-check/test.sh b/core/rs/integration-check/test.sh new file mode 100755 index 000000000..0dc5cf5e8 --- /dev/null +++ b/core/rs/integration-check/test.sh @@ -0,0 +1,3 @@ +sed -i .bk 's/crate-type = \["staticlib"\]/crate-type = \["rlib"\]/' ../bundle/Cargo.toml +cargo test +mv ../bundle/Cargo.toml.bk ../bundle/Cargo.toml \ No newline at end of file diff --git a/core/src/util.h b/core/src/util.h index 51518b464..7e45024ed 100644 --- a/core/src/util.h +++ b/core/src/util.h @@ -2,6 +2,7 @@ #define CRSQLITE_UTIL #include +#include #include "crsqlite.h"