---
 Makefile                             |   11 ++++++++++-
 support/test/sin_testing/__init__.py |   14 ++++++++------
 support/test/smoketest               |    2 +-
 3 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile
index c94f8ac..d3e522d 100644
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,8 @@ SRCDIR=src
 TESTDIR=test
 COPYDIRS= src test priv
 BEAMDIR=$(APPDIR)/ebin
+SMOKETEST_DIR=$(CURDIR)/support/test
+PYPATH=$(PYTHONPATH):$(SMOKETEST_DIR)
 RSYNC_OPTIONS=-vaz --delete
 
 .SUFFIXES: .erl .beam .yrl
@@ -18,7 +20,7 @@ ERL_TEST_OBJ = $(patsubst test/%.erl,$(BEAMDIR)/%.beam, 
$(wildcard $(TESTDIR)/*e
 all: main
 
 setup: $(COPYDIRS)
-       for f in $^ ; do        \
+       for f in $^ ; do        \
                mkdir -p $(APPDIR)/$$f ; \
                rsync $(RSYNC_OPTIONS) $$f $(APPDIR); \
        done
@@ -44,6 +46,13 @@ run: main
 debug: main
        $(ERL) -pa $(BEAMDIR) -s sinan manual_start -s debugger start
 
+smoketests: main
+       for f in $(wildcard $(SMOKETEST_DIR)/tests/*.py) ; do   \
+               PYTHONPATH=$(PYPATH) python $$f ; \
+       done
+
+testall : cucumber test smoketests
+
 clean:
        rm -rf _build ;
        rm -rf erl_crush.dump
diff --git a/support/test/sin_testing/__init__.py 
b/support/test/sin_testing/__init__.py
index 11b2dc4..376dc26 100755
--- a/support/test/sin_testing/__init__.py
+++ b/support/test/sin_testing/__init__.py
@@ -55,11 +55,13 @@ def sinan(command):
         def new_f(*args, **kwds):
             print("Running Command %s in %s" % (command, os.getcwd()))
             self = args[0]
-            child = spawn("erl -noshell -pa %s "
+            child_cmd = ("erl -noshell -pa %s "
                           " -s sinan manual_start"
                           " -s sinan main"
                           " -extra %s" %
                           (get_build_root_path(self.project_dir), command))
+            print child_cmd
+            child = spawn(child_cmd)
             res = f(self, child, *(args[1:]), **kwds)
             print("Finished %s successfully" % command)
             return res
@@ -94,16 +96,13 @@ def run_tests(class_obj):
 
 class SmokeTest(unittest.TestCase):
     def get_project_root(self, cwd):
-        current = os.path.abspath(cwd)
-        return os.path.join(os.sep, *(current.split(os.sep)[:-2]))
-
+        return os.path.abspath(cwd)
 
     def setUp(self):
         self.smokedir = tempfile.mkdtemp(prefix='smoke_test_')
 
         self.current_dir = os.getcwd()
         self.project_dir = self.get_project_root(self.current_dir)
-
         sys.path.append(self.current_dir)
 
         os.chdir(self.smokedir)
@@ -191,7 +190,8 @@ class SmokeTest(unittest.TestCase):
                                    "doc")
             self.assert_files_exist(ppath,
                                     ["src", n + "_app.erl"],
-                                    ["src", n + "_sup.erl"])
+                                    ["src", n + "_sup.erl"],
+                                    ["src", n + ".app.src"])
 
         return a
 
@@ -262,7 +262,9 @@ class SmokeTest(unittest.TestCase):
         tar_file = os.path.join(os.getcwd(), "_build", "development", "tar",
                                 "%s-%s.tar.gz" %
                                 (appdesc.project_name, 
appdesc.project_version))
+
         self.assertTrue(os.path.isfile(tar_file))
+
         return appdesc
 
     def do_run(self, appdesc):
diff --git a/support/test/smoketest b/support/test/smoketest
index 3762f6a..354e604 100755
--- a/support/test/smoketest
+++ b/support/test/smoketest
@@ -1,4 +1,4 @@
 #!/bin/sh
 
 # run nose in the tests directory
-nosetests -s ./tests
+nosetests -s $1
-- 
1.7.5.2

-- 
You received this message because you are subscribed to the Google Groups 
"erlware-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/erlware-dev?hl=en.

Reply via email to