[tests] [win] workaround to escape backslashes
[aubio.git] / tests / wscript_build
index 52342de..7ae6449 100644 (file)
@@ -9,6 +9,8 @@ programs_sources = ctx.path.ant_glob('src/**/*.c')
 
 test_sound_target = '44100Hz_44100f_sine441_stereo.wav'
 test_sound_abspath = bld.path.get_bld().make_node(test_sound_target)
+# workaround to double escape backslash characters on windows
+test_sound_abspath = str(test_sound_abspath).replace('\\', '\\\\')
 
 bld(name='create_tests_source',
     rule='python ${SRC} ${TGT}',
@@ -24,5 +26,5 @@ for source_file in programs_sources:
             use = uselib,
             install_path = None,
             defines = ['AUBIO_UNSTABLE_API=1',
-                        'AUBIO_TESTS_SOURCE=\"{}\"'.format(test_sound_abspath)]
+                        'AUBIO_TESTS_SOURCE={}'.format(test_sound_abspath)]
        )