From 013b4d50432a3eba08a9cb54b9edf6b25a6378a8 Mon Sep 17 00:00:00 2001 From: Mingli Yu Date: Fri, 10 Nov 2023 19:52:40 +0800 Subject: nlohmann-json: Add ptest support * Backport 2 patches [1] [2] to fix the build failure under tests dir. * Fetch the test data during do_fetch phase to avoid internet access during test as some tests need test data. # ./run-ptest PASS: test-algorithms_cpp11 PASS: test-allocator_cpp11 PASS: test-alt-string_cpp11 PASS: test-assert_macro_cpp11 PASS: test-binary_formats_cpp11 [snip] PASS: test-unicode5_cpp11 PASS: test-user_defined_input_cpp11 PASS: test-windows_h_cpp11 PASS: test-wstring_cpp11 [1] https://github.com/nlohmann/json/commit/6cec5aefc97ad219b6fd5a4132f88f7c8f6800ee [2] https://github.com/nlohmann/json/commit/660d0b58565073975d6f5d94365d6cbf150a4cf8 Signed-off-by: Mingli Yu Signed-off-by: Khem Raj --- meta-oe/recipes-devtools/nlohmann-json/files/run-ptest | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 meta-oe/recipes-devtools/nlohmann-json/files/run-ptest (limited to 'meta-oe/recipes-devtools/nlohmann-json/files/run-ptest') diff --git a/meta-oe/recipes-devtools/nlohmann-json/files/run-ptest b/meta-oe/recipes-devtools/nlohmann-json/files/run-ptest new file mode 100755 index 0000000000..2f00267d50 --- /dev/null +++ b/meta-oe/recipes-devtools/nlohmann-json/files/run-ptest @@ -0,0 +1,12 @@ +#!/bin/sh + +cd tests +for atest in test-* ; do + rm -rf tests.log + ./${atest} > tests.log 2>&1 + if [ $? = 0 ] ; then + echo "PASS: ${atest}" + else + echo "FAIL: ${atest}" + fi +done -- cgit v1.2.3-54-g00ecf