Skip to content
Merged
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
18 changes: 10 additions & 8 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@ set -uo pipefail

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
PROJECT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
TESTS_DIR="$PROJECT_DIR/tests/required"

is_windows=false
case "$(uname -s | tr '[:upper:]' '[:lower:]')" in
*mingw*|*msys*|*cygwin*) is_windows=true ;;
esac

COMPILER="$PROJECT_DIR/build/dynlex"
if [[ ! -x "$COMPILER" && -x "$PROJECT_DIR/build/dynlex.exe" ]]; then
COMPILER="$PROJECT_DIR/build/dynlex.exe"
if [[ "$is_windows" == "true" ]]; then
COMPILER+=".exe"
fi
TESTS_DIR="$PROJECT_DIR/tests/required"

# Colors
RED='\033[0;31m'
Expand All @@ -20,10 +26,6 @@ failed=0
skipped=0
failures=()
test_output=""
is_windows=false
case "$(uname -s | tr '[:upper:]' '[:lower:]')" in
*mingw*|*msys*|*cygwin*) is_windows=true ;;
esac

# Known failing tests — these don't count as unexpected failures
KNOWN_FAILURES=""
Expand Down Expand Up @@ -382,7 +384,7 @@ run_auxiliary_test() {

run_auxiliary_test "dl_file_discovery" 10 python3 -B "$SCRIPT_DIR/test_dl_files.py"
run_auxiliary_test "dependency_installer" 10 python3 -B "$SCRIPT_DIR/test_install.py"
run_auxiliary_test "import_root_consistency" 60 python3 -B "$SCRIPT_DIR/test_import_roots.py"
run_auxiliary_test "import_root_consistency" 60 python3 -B "$SCRIPT_DIR/test_import_roots.py" "$COMPILER"

echo "Testing timeout_process_tree..."
timeout_test_start_ms=$(now_ms)
Expand Down
7 changes: 5 additions & 2 deletions scripts/test_import_roots.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@
from __future__ import annotations

import subprocess
import sys
import tempfile
import unittest
from pathlib import Path

SCRIPT_DIR = Path(__file__).resolve().parent
COMPILER = SCRIPT_DIR.parent / "build" / "dynlex"
if len(sys.argv) != 2:
raise SystemExit(f"Usage: {Path(sys.argv[0]).name} <compiler>")

COMPILER = Path(sys.argv.pop()).resolve()


class ImportRootConsistencyTests(unittest.TestCase):
Expand Down
Binary file modified src/web/ide/public/compiler/dynlex_web.wasm
Binary file not shown.
Loading