Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions test/autoconf/configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
AC_INIT([test], [1.0])
AC_PROG_CC
AC_CHECK_FUNCS([getcwd getwd nonexistent_func])
AC_CHECK_HEADERS([stdio.h nonexistent_header.h])
AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[return 0;]])],
[run_ok=yes], [run_ok=no])
AS_IF([test "x$run_ok" = xyes],
[AC_MSG_NOTICE([run test passed])],
[AC_MSG_ERROR([run test failed])])
AC_OUTPUT
12 changes: 12 additions & 0 deletions test/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -12518,6 +12518,18 @@ def test_autoconf_check_lib_side_module(self):
''')
self.run_process([EMCC, 'conftest.c', 'libtest.so', '-o', 'conftest.js'])

@no_windows('configure scripts are Unix shell scripts')
@requires_tool('autoconf')
def test_autoconf_configure(self):
copytree(test_file('autoconf'), '.')
self.run_process(['autoconf'])
out = self.run_process([EMCONFIGURE, './configure'], stdout=PIPE).stdout
self.assertContained('checking for getcwd... yes', out)
self.assertContained('checking for getwd... no', out)
self.assertContained('checking for nonexistent_func... no', out)
self.assertContained('checking for nonexistent_header.h... no', out)
self.assertContained('configure: run test passed', out)

def test_standalone_export_main(self):
# Tests that explicitly exported `_main` does not fail, even though `_start` is the entry
# point.
Expand Down
Loading