#!/bin/bash

outputfile=$1
shift
test_source_files="$@"

echo '/* ** This file is autogenerated. Do not edit. ** */' > $outputfile
echo '' >> $outputfile
echo 'const char *test_unit_names[] = {' >> $outputfile

for test_source_file in $test_source_files; do
  echo "  \"$(echo $test_source_file | sed 's/.*\(test-[a-z0-9\-]\+\)\.c/\1/')\"," >> $outputfile
done

echo '};' >> $outputfile
