Skip to content

Commit

Permalink
correctly clean up old builds; add debugging to builds
Browse files Browse the repository at this point in the history
  • Loading branch information
dromer committed Nov 30, 2023
1 parent 2e6da70 commit 1540e73
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/framework/base_signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def compile_and_run(
str(block_size or 480),
str(num_iterations or 100)])

return wav_path
return exe_path, wav_path

def _compare_wave_output(self, out_dir, c_sources, golden_path, flag=None):
# http://stackoverflow.com/questions/10580676/comparing-two-numpy-arrays-for-equality-element-wise
Expand Down
3 changes: 3 additions & 0 deletions tests/framework/base_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ def _compile_and_run(
source_files=source_files,
out_path=exe_path))

# run the clean command
subprocess.check_output(["make", "-C", os.path.dirname(makefile_path), "clean"])

# run the compile command
subprocess.check_output(["make", "-C", os.path.dirname(makefile_path), "-j"])

Expand Down
2 changes: 1 addition & 1 deletion tests/framework/template/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CC=clang
CXX=clang++
COMMONFLAGS=-Werror -Wno-unused-function -Wno-\#warnings {{" ".join(simd_flags)}}
COMMONFLAGS=-Werror -Wno-unused-function -g -Wno-\#warnings {{" ".join(simd_flags)}}
CFLAGS=-std=c11 $(COMMONFLAGS)
CXXFLAGS=-std=c++11 -fno-exceptions -fno-rtti $(COMMONFLAGS)

Expand Down
9 changes: 9 additions & 0 deletions tests/src/signal/test_signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@
#include "tinywav.h"

int main(int argc, const char *argv[]) {
#if HV_SIMD_AVX
printf("AVX!\n");
#elif HV_SIMD_SSE
printf("SSE!\n");
#elif HV_SIMD_NEON
printf("NEON!\n");
#else // HV_SIMD_NONE
printf("NONE!\n");
#endif
if (argc < 5) return -1;
const char *outputPath = argv[1];
const double sampleRate = atof(argv[2]);
Expand Down

0 comments on commit 1540e73

Please sign in to comment.