aboutsummaryrefslogtreecommitdiff
path: root/tests/test_hardware.c
diff options
context:
space:
mode:
authorJia Tan <jiat0218@gmail.com>2022-10-05 16:41:38 +0800
committerLasse Collin <lasse.collin@tukaani.org>2022-10-05 16:10:21 +0300
commit6ca5c354bd4620aa7f81da68870eef1b1f26288f (patch)
tree4fce708cc0bc288902686ef9014d4ea1795ea499 /tests/test_hardware.c
parenttuklib_integer: Add 64-bit endianness-converting reads and writes. (diff)
downloadxz-6ca5c354bd4620aa7f81da68870eef1b1f26288f.tar.xz
Tests: Fix compilation error when threading support has been disabled.
Now tests that require threading are skipped when threading support has been disabled. Thanks to Sebastian Andrzej Siewior.
Diffstat (limited to 'tests/test_hardware.c')
-rw-r--r--tests/test_hardware.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_hardware.c b/tests/test_hardware.c
index 34d07892..17c51da2 100644
--- a/tests/test_hardware.c
+++ b/tests/test_hardware.c
@@ -30,8 +30,12 @@ test_lzma_physmem(void)
static void
test_lzma_cputhreads(void)
{
+#ifndef MYTHREAD_ENABLED
+ assert_skip("Threading support disabed");
+#else
if (lzma_cputhreads() == 0)
assert_skip("Could not determine cpu core count");
+#endif
}