Skip to content

Commit

Permalink
Fix building issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dagargo committed Feb 10, 2023
1 parent 454d7cd commit d831ce9
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 31 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.69])
AC_INIT([elektroid],[2.4],[[email protected]])
AC_INIT([elektroid],[2.4.1],[[email protected]])
AC_CONFIG_SRCDIR([src])
AC_CONFIG_HEADERS([config.h])
LT_INIT
Expand Down
18 changes: 2 additions & 16 deletions test/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PKG_CONFIG ?= pkg-config

AM_CFLAGS = -Wall
AM_CPPFLAGS = -Wall -DSCALA_TEST_DIR='"$(srcdir)/res/scala"'

check_PROGRAMS = tests_scala

Expand All @@ -18,21 +18,7 @@ tests_scala_SOURCES = \

TESTS = connectors/test.sh $(check_PROGRAMS)

EXTRA_DIST = \
$(TESTS) \
res/connectors/CZ-101 internal 01 src.syx \
res/connectors/CZ-101 panel 01 src.syx \
res/connectors/devices.json \
res/connectors/Eventide Factor New Name.syx \
res/connectors/Eventide Factor Preset.syx \
res/connectors/Moog Little Phatty New Name.syx \
res/connectors/Moog Little Phatty Preset.syx \
res/connectors/sequence_back.mbseq \
res/connectors/sequence.mbseq \
res/connectors/silence.wav \
res/connectors/SOUND.dtdata \
res/connectors/square.wav \
res/connectors/square_loop.wav
EXTRA_DIST = connectors res

AM_TESTS_ENVIRONMENT = \
ecli='$(abs_top_builddir)/src/elektroid-cli -vv'; \
Expand Down
Binary file removed test/PROJECT.dtprj
Binary file not shown.
Binary file removed test/SOUND.dtsnd
Binary file not shown.
Binary file removed test/res/connectors/CZ-101 internal 01 src.syx
Binary file not shown.
24 changes: 10 additions & 14 deletions test/tests_scala.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ test_success ()
printf ("\n");

data = g_byte_array_sized_new (TEST_MAX_FILE_LEN);
load_file ("res/scala/success.scl", data, NULL);
load_file (SCALA_TEST_DIR "/success.scl", data, NULL);
err = scl_init_scala_from_bytes (&scala, data);
g_byte_array_free (data, TRUE);

Expand Down Expand Up @@ -129,7 +129,7 @@ test_success_perfect_5th ()
printf ("\n");

data = g_byte_array_sized_new (TEST_MAX_FILE_LEN);
load_file ("res/scala/perfect_5th.scl", data, NULL);
load_file (SCALA_TEST_DIR "/perfect_5th.scl", data, NULL);
err = scl_init_scala_from_bytes (&scala, data);
g_byte_array_free (data, TRUE);

Expand Down Expand Up @@ -166,7 +166,7 @@ test_too_many_notes ()
printf ("\n");

data = g_byte_array_sized_new (TEST_MAX_FILE_LEN);
load_file ("res/scala/too_many_notes.scl", data, NULL);
load_file (SCALA_TEST_DIR "/too_many_notes.scl", data, NULL);
err = scl_init_scala_from_bytes (&scala, data);

CU_ASSERT_EQUAL (err, -ERANGE);
Expand All @@ -184,7 +184,7 @@ test_no_notes ()
printf ("\n");

data = g_byte_array_sized_new (TEST_MAX_FILE_LEN);
load_file ("res/scala/no_notes.scl", data, NULL);
load_file (SCALA_TEST_DIR "/no_notes.scl", data, NULL);
err = scl_init_scala_from_bytes (&scala, data);

CU_ASSERT_EQUAL (err, -ERANGE);
Expand All @@ -202,7 +202,7 @@ test_unmatching_notes ()
printf ("\n");

data = g_byte_array_sized_new (TEST_MAX_FILE_LEN);
load_file ("res/scala/unmatching_notes.scl", data, NULL);
load_file (SCALA_TEST_DIR "/unmatching_notes.scl", data, NULL);
err = scl_init_scala_from_bytes (&scala, data);

CU_ASSERT_EQUAL (err, -EINVAL);
Expand All @@ -213,15 +213,14 @@ test_unmatching_notes ()
void
test_get_2_byte_octave_midi_message ()
{
struct scala scala;
GByteArray *msg;
gint err;

printf ("\n");

msg = g_byte_array_sized_new (TEST_MAX_FILE_LEN);
err =
scl_get_2_byte_octave_tuning_msg_from_scala_file ("res/scala/success.scl",
scl_get_2_byte_octave_tuning_msg_from_scala_file (SCALA_TEST_DIR "/success.scl",
msg, NULL);

CU_ASSERT_EQUAL (err, 0);
Expand All @@ -237,14 +236,13 @@ void
test_get_bulk_tuning_midi_message ()
{
gint err;
struct scala scala;
GByteArray *msg;
guint8 *b, *f_data;

printf ("\n");

msg = g_byte_array_sized_new (TEST_MAX_FILE_LEN);
err = scl_get_key_based_tuning_msg_from_scala_file ("res/scala/success.scl",
err = scl_get_key_based_tuning_msg_from_scala_file (SCALA_TEST_DIR "/success.scl",
msg, NULL);

CU_ASSERT_EQUAL (err, 0);
Expand Down Expand Up @@ -280,15 +278,14 @@ test_get_bulk_tuning_midi_message ()
void
test_get_2_byte_octave_midi_message_tet ()
{
struct scala scala;
GByteArray *msg;
gint err;

printf ("\n");

msg = g_byte_array_sized_new (TEST_MAX_FILE_LEN);
err =
scl_get_2_byte_octave_tuning_msg_from_scala_file ("res/scala/TET.scl",
scl_get_2_byte_octave_tuning_msg_from_scala_file (SCALA_TEST_DIR "/TET.scl",
msg, NULL);

CU_ASSERT_EQUAL (err, 0);
Expand All @@ -305,13 +302,12 @@ test_get_bulk_tuning_midi_message_tet ()
{
gint err;
guint8 *b;
struct scala scala;
GByteArray *msg;

printf ("\n");

msg = g_byte_array_sized_new (TEST_MAX_FILE_LEN);
err = scl_get_key_based_tuning_msg_from_scala_file ("res/scala/TET.scl",
err = scl_get_key_based_tuning_msg_from_scala_file (SCALA_TEST_DIR "/TET.scl",
msg, NULL);

CU_ASSERT_EQUAL (err, 0);
Expand All @@ -338,7 +334,7 @@ test_get_bulk_tuning_midi_message_tet ()
int
main (int argc, char *argv[])
{
int err;
int err = 0;

debug_level = 5;

Expand Down

0 comments on commit d831ce9

Please sign in to comment.