]> git.corax.cc Git - toolbox/commitdiff
test: Use toolbox in parent directory for tests
authorMatthias Kruk <m@m10k.eu>
Tue, 27 Dec 2022 05:52:20 +0000 (14:52 +0900)
committerMatthias Kruk <m@m10k.eu>
Tue, 27 Dec 2022 05:52:20 +0000 (14:52 +0900)
Because none of the test specs set PATH, tests use the toolbox version
that is installed in the environment, not the one that is being tested.

This commit modifies the test specs so they prepend the parent directory
to PATH. Further, this adds a symbolic link to the includes in the parent
directory, making sure the correct includes path is searched first.

12 files changed:
test/array_spec.sh
test/include [new symlink]
test/ipc_spec.sh
test/is_spec.sh
test/json_spec.sh
test/log_spec.sh
test/mutex_spec.sh
test/opt_spec.sh
test/queue_spec.sh
test/sem_spec.sh
test/uipc_spec.sh
test/wmutex_spec.sh

index 5699bee94cef46025d0dc72054f542bd5b781746..d6f8210b989932c8cdf9b29b361e9d2fe80ac11a 100644 (file)
@@ -16,6 +16,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+export PATH="$PWD/..:$PATH"
+
 if ! . toolbox.sh; then
        exit 1
 fi
diff --git a/test/include b/test/include
new file mode 120000 (symlink)
index 0000000..f5030fe
--- /dev/null
@@ -0,0 +1 @@
+../include
\ No newline at end of file
index 1f956b4e537cb3adfa9ad77d3778efc85ff0a84b..01549e0462b32d984b3db6e484ea2f69cbb3663f 100644 (file)
@@ -16,6 +16,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+export PATH="$PWD/..:$PATH"
+
 . toolbox.sh
 include "ipc"
 
index c016097c48969f3951dc81139844194e4b1fe316..e23df5a67f43ca1cfd04c22b1ecac603c2b2cf8a 100644 (file)
@@ -16,6 +16,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+export PATH="$PWD/..:$PATH"
+
 . toolbox.sh
 include "is"
 
index 0d5f93ef2194f8566b9eeb7650536c36a9b3216c..3a648761b85a0d864a25aadda7ded44d66de8a7b 100644 (file)
@@ -16,6 +16,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+export PATH="$PWD/..:$PATH"
+
 if ! . toolbox.sh; then
        exit 1
 fi
index b140b0430f73f0351ab3b56324fd86f8115caf75..13868c6dc85c1ba2ac3c66b6026b8cab09bdee60 100644 (file)
@@ -16,6 +16,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+export PATH="$PWD/..:$PATH"
+
 . toolbox.sh
 
 include "log"
index 0e4429168db067735c6720057618a533335b056d..ef96d12a784ac55c1639ef56e6074d479112d778 100644 (file)
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+export PATH="$PWD/..:$PATH"
+
 . toolbox.sh
 include "mutex"
 
index 50d8d663d1abd096c2073687e7fa3949c6fe1f39..81a8ab53a836e9f4800401a84025064ac7e07f92 100644 (file)
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+export PATH="$PWD/..:$PATH"
+
 . toolbox.sh
 include "opt"
 
index a88ce3f41fabd172347ce5eaf87b3b1d7950abc1..a921348b95496bb098f8682800828b50b88f55f3 100644 (file)
@@ -16,6 +16,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+export PATH="$PWD/..:$PATH"
+
 if ! . toolbox.sh; then
        exit 1
 fi
index f4e0a227e23ab734f94a4b9148fd97bf572c369e..72d10557f262588f93cb46e84c0dd2894e39b534 100644 (file)
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+export PATH="$PWD/..:$PATH"
+
 . toolbox.sh
 include "sem"
 
index 0a2179518d4e2968c398fa706e5bafee3d6b4fa7..9d258066c63a1a95d36837cb61e517f03bcf8690 100644 (file)
@@ -16,6 +16,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+export PATH="$PWD/..:$PATH"
+
 . toolbox.sh
 include "uipc"
 
index 61adfec84031e351b6701a99bd442f8209a21802..ad1c5bf5e8725405e75ce989c043433b2d836a9d 100644 (file)
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+export PATH="$PWD/..:$PATH"
+
 . toolbox.sh
 include "wmutex"