diff options
| -rw-r--r-- | xmake/actions/test/main.lua | 2 | ||||
| -rw-r--r-- | xmake/actions/test/xmake.lua | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/xmake/actions/test/main.lua b/xmake/actions/test/main.lua index 620c63134..ccc69e897 100644 --- a/xmake/actions/test/main.lua +++ b/xmake/actions/test/main.lua @@ -269,7 +269,7 @@ function _run_tests(tests) local spent = os.mclock() print("running tests ...") local report = {passed = 0, total = #ordertests} - local jobs = tonumber(option.get("jobs") or "1") + local jobs = tonumber(option.get("jobs")) or os.default_njob() runjobs("run_tests", function (index) local testinfo = ordertests[index] if testinfo then diff --git a/xmake/actions/test/xmake.lua b/xmake/actions/test/xmake.lua index b72de7b02..a248623a6 100644 --- a/xmake/actions/test/xmake.lua +++ b/xmake/actions/test/xmake.lua @@ -34,7 +34,7 @@ task("test") "e.g.", " xmake test -w .", " xmake test --workdir=`pwd`" }, - {'j', "jobs", "kv", "1", "Set the number of parallel compilation jobs." }, + {'j', "jobs", "kv", tostring(os.default_njob()), "Set the number of parallel compilation jobs." }, {'r', "rebuild", "k", nil , "Rebuild the target." }, {}, {nil, "tests", "vs", nil , "The test names. It support pattern matching.", |
