Commit 3136dd71 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Basic test suite, starting with a django test

(Django 1.7.5)
parent a5c141ed
......@@ -4,3 +4,6 @@
[submodule "libpypa"]
path = libpypa
url = git://github.com/vinzenz/libpypa.git
[submodule "test/integration/django"]
path = test/integration/django
url = https://github.com/django/django
......@@ -492,6 +492,7 @@ check:
$(PYTHON) $(TOOLS_DIR)/tester.py -R pyston_dbg -j$(TEST_THREADS) -k -a=-S $(TESTS_DIR) $(ARGS)
@# we pass -I to cpython tests & skip failing ones because they are sloooow otherwise
$(PYTHON) $(TOOLS_DIR)/tester.py -R pyston_dbg -j$(TEST_THREADS) -k -a=-S -a=-I --exit-code-only --skip-failing $(TEST_DIR)/cpython $(ARGS)
$(PYTHON) $(TOOLS_DIR)/tester.py -R pyston_dbg -j$(TEST_THREADS) -k -a=-S --exit-code-only -t60 $(TEST_DIR)/integration $(ARGS)
$(PYTHON) $(TOOLS_DIR)/tester.py -R pyston_dbg -j$(TEST_THREADS) -k -a=-n -a=-x -a=-S $(TESTS_DIR) $(ARGS)
@# skip -O for dbg
......@@ -508,6 +509,7 @@ check:
$(PYTHON) $(TOOLS_DIR)/tester.py -R pyston_release -j$(TEST_THREADS) -k -a=-S $(TESTS_DIR) $(ARGS)
@# we pass -I to cpython tests and skip failing ones because they are sloooow otherwise
$(PYTHON) $(TOOLS_DIR)/tester.py -R pyston_release -j$(TEST_THREADS) -k -a=-S -a=-I --exit-code-only --skip-failing $(TEST_DIR)/cpython $(ARGS)
$(PYTHON) $(TOOLS_DIR)/tester.py -R pyston_release -j$(TEST_THREADS) -k -a=-S --exit-code-only -t60 $(TEST_DIR)/integration $(ARGS)
@# skip -n for dbg
$(PYTHON) $(TOOLS_DIR)/tester.py -R pyston_release -j$(TEST_THREADS) -k -a=-O -a=-x -a=-S $(TESTS_DIR) $(ARGS)
......@@ -951,6 +953,7 @@ check$1 test$1: $(PYTHON_EXE_DEPS) pyston$1 ext_pyston
$(PYTHON) $(TOOLS_DIR)/tester.py -R pyston$1 -j$(TEST_THREADS) -a=-S -k $(TESTS_DIR) $(ARGS)
@# we pass -I to cpython tests and skip failing ones because they are sloooow otherwise
$(PYTHON) $(TOOLS_DIR)/tester.py -R pyston$1 -j$(TEST_THREADS) -a=-S -a=-I -k --exit-code-only --skip-failing $(TEST_DIR)/cpython $(ARGS)
$(PYTHON) $(TOOLS_DIR)/tester.py -R pyston$1 -j$(TEST_THREADS) -k -a=-S --exit-code-only -t=60 $(TEST_DIR)/integration $(ARGS)
$(PYTHON) $(TOOLS_DIR)/tester.py -a=-x -R pyston$1 -j$(TEST_THREADS) -a=-n -a=-S -k $(TESTS_DIR) $(ARGS)
$(PYTHON) $(TOOLS_DIR)/tester.py -R pyston$1 -j$(TEST_THREADS) -a=-O -a=-S -k $(TESTS_DIR) $(ARGS)
......
Subproject commit 634f4229c5cafeb3a1c03e5deb9434d7c0f74ebe
# run_args: -x
# - pypa currently has a couple issues with django (set literals with trailing commas, nested attribute names)
# TODO remove that directive, and also remove it from the subprocess commands down below.
import os
import subprocess
import sys
EXTRA_PATH = os.path.dirname(__file__) + "/django"
sys.path.insert(0, EXTRA_PATH)
from django.core.management import execute_from_command_line
import os
import shutil
if os.path.exists("testsite"):
print "Removing the existing 'testsite/' directory"
shutil.rmtree("testsite")
try:
sys.argv += ["startproject", "testsite"]
print "Running 'startproject testsite'"
r = execute_from_command_line()
assert not r
print "Running testsite/manage.py migrate"
env = dict(os.environ)
env["PYTHONPATH"] = env.get("PYTHONPATH", "") + ":" + EXTRA_PATH
subprocess.check_call([sys.executable, "-x", "testsite/manage.py", "migrate"], env=env)
# subprocess.check_call([sys.executable, "testsite/manage.py", "runserver", "--noreload"])
finally:
pass
# shutil.rmtree("testsite")
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment