From 6078e9bbee2171ddb9b33bfa345473977b6c4f4b Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 21 Mar 2025 20:46:09 +0000 Subject: Tidy perf tests with helper --- test/Jamfile.jam | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/test/Jamfile.jam b/test/Jamfile.jam index bedc2ad..5189add 100644 --- a/test/Jamfile.jam +++ b/test/Jamfile.jam @@ -43,6 +43,16 @@ project : requirements tidy:boost ; lib test : [ glob *.cpp : test-*.cpp perf-*.cpp ] ; +rule perfrun ( main + : extra-requirements * : runtime-dependency * : command-args * ) { + local name = $(main[0]:S=) ; + local benchmark = $(main[0]:S=.benchmark) ; + explicit $(name) ; + exe $(benchmark) : $(main) : + benchmark + test + $(extra-requirements) ; + run $(benchmark) : $(command-args) : : $(runtime-dependency) : $(name) ; +} run test-collection.cpp ; run test-maths.cpp ; @@ -55,22 +65,17 @@ run test-enumDetails.cpp ; run test-render.cpp : -- : test-assetFactory : test ; run test-glContextBhvr.cpp ; run test-assetFactory.cpp : -- : [ sequence.insertion-sort [ glob-tree $(res) : *.* ] fixtures/rgb.txt test-instancing ] : test ; -run perf-assetFactory.cpp : \< : test-assetFactory : benchmark test ; -run perf-geoData.cpp : \< : test-geoData : test benchmark ; -run perf-terrain.cpp : \< : test-geoData : test benchmark ; -run perf-persistence.cpp : \< : test-persistence : benchmark test ; +perfrun perf-assetFactory.cpp : : test-assetFactory ; +perfrun perf-geoData.cpp : : test-geoData ; +perfrun perf-terrain.cpp : : test-geoData ; +perfrun perf-persistence.cpp : : test-persistence ; run test-worker.cpp ; run test-instancing.cpp : -- : test-glContainer : test ; -run perf-instancing.cpp : \< : test-instancing : benchmark test ; +perfrun perf-instancing.cpp : : test-instancing ; run test-glContainer.cpp : : : test ; run test-pack.cpp : : : test ; run test-environment.cpp : : : test ; compile test-static-enumDetails.cpp ; compile test-static-stream_support.cpp ; -explicit perf-assetFactory ; -explicit perf-persistence ; -explicit perf-geoData ; -explicit perf-instancing ; -explicit perf-terrain ; alias perf : perf-assetFactory perf-persistence perf-geoData perf-instancing perf-terrain ; explicit perf ; -- cgit v1.2.3