build: use python f-strings
Change-Id: I955739ac40508642509521760c1bc75286c94f30
diff --git a/tests/other/wscript b/tests/other/wscript
index 0d94bd6..a2099aa 100644
--- a/tests/other/wscript
+++ b/tests/other/wscript
@@ -1,6 +1,6 @@
# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
"""
-Copyright (c) 2014-2019, Regents of the University of California,
+Copyright (c) 2014-2023, Regents of the University of California,
Arizona Board of Regents,
Colorado State University,
University Pierre & Marie Curie, Sorbonne University,
@@ -29,20 +29,20 @@
for module, name in {"cs-benchmark": "CS Benchmark",
"pit-fib-benchmark": "PIT & FIB Benchmark"}.items():
# main
- bld.objects(target='other-tests-%s-main' % module,
+ bld.objects(target=f'other-tests-{module}-main',
source='../main.cpp',
use='BOOST',
- defines=['BOOST_TEST_MODULE=%s' % name])
+ defines=[f'BOOST_TEST_MODULE={name}'])
# module
bld.program(name=module,
- target='../../%s' % module,
- source=bld.path.ant_glob('%s*.cpp' % module),
- use='daemon-objects other-tests-%s-main' % module,
+ target=f'{top}/{module}',
+ source=bld.path.ant_glob(f'{module}*.cpp'),
+ use=f'daemon-objects other-tests-{module}-main',
install_path=None)
# face-benchmark does not rely on Boost.Test
bld.program(name='face-benchmark',
- target='../../face-benchmark',
+ target=f'{top}/face-benchmark',
source=bld.path.ant_glob('face-benchmark*.cpp'),
use='daemon-objects',
install_path=None)
diff --git a/tests/wscript b/tests/wscript
index cf28718..ed4eb19 100644
--- a/tests/wscript
+++ b/tests/wscript
@@ -1,6 +1,6 @@
# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
"""
-Copyright (c) 2014-2020, Regents of the University of California,
+Copyright (c) 2014-2023, Regents of the University of California,
Arizona Board of Regents,
Colorado State University,
University Pierre & Marie Curie, Sorbonne University,
@@ -41,10 +41,10 @@
for module in ['core', 'daemon', 'rib', 'tools']:
# main() for the module
- bld.objects(target='unit-tests-%s-main' % module,
+ bld.objects(target=f'unit-tests-{module}-main',
source='main.cpp',
use='BOOST',
- defines=['BOOST_TEST_MODULE=NFD %s' % module.capitalize()])
+ defines=[f'BOOST_TEST_MODULE=NFD {module.capitalize()}'])
subdir = 'daemon/rib' if module == 'rib' else module
node = bld.path.find_dir(subdir)
@@ -66,10 +66,10 @@
objmod = 'daemon' if module == 'rib' else module
# unit-tests binary for the module
- bld.program(name='unit-tests-%s' % module,
- target='../unit-tests-%s' % module,
+ bld.program(name=f'unit-tests-{module}',
+ target=f'{top}/unit-tests-{module}',
source=src,
- use='%s-objects tests-common unit-tests-%s-main' % (objmod, module),
+ use=f'{objmod}-objects tests-common unit-tests-{module}-main',
defines=[tmpdir],
install_path=None)