comparison setup.py @ 602:be3fd3874c3a frontends_multi_profiles

add very basic test system accessible from <root_url>/test, to be improved: - if you don't get any AssertError pop-up, everything is fine - TODO: nicely display the results in HTML output
author souliane <souliane@mailoo.org>
date Sat, 07 Feb 2015 19:24:38 +0100
parents 0a06cf833f5a
children 9877607c719a
comparison
equal deleted inserted replaced
601:49ccfc22116c 602:be3fd3874c3a
117 tmp_dir = tempfile.mkdtemp() 117 tmp_dir = tempfile.mkdtemp()
118 import sat, sat_frontends, libervia 118 import sat, sat_frontends, libervia
119 os.symlink(os.path.dirname(sat.__file__), os.path.join(tmp_dir,"sat")) # FIXME: only work on unixes 119 os.symlink(os.path.dirname(sat.__file__), os.path.join(tmp_dir,"sat")) # FIXME: only work on unixes
120 os.symlink(os.path.dirname(sat_frontends.__file__), os.path.join(tmp_dir,"sat_frontends")) # FIXME: only work on unixes 120 os.symlink(os.path.dirname(sat_frontends.__file__), os.path.join(tmp_dir,"sat_frontends")) # FIXME: only work on unixes
121 os.symlink(os.path.dirname(libervia.__file__), os.path.join(tmp_dir,"libervia")) # FIXME: only work on unixes 121 os.symlink(os.path.dirname(libervia.__file__), os.path.join(tmp_dir,"libervia")) # FIXME: only work on unixes
122 result = subprocess.call(['pyjsbuild', 'libervia_main', '-d', '--no-compile-inplace', '-I', tmp_dir, '-o', self.pyjamas_output_dir]) 122 for module in ('libervia_main', 'libervia_test'):
123 result = subprocess.call(['pyjsbuild', module, '-d', '--no-compile-inplace', '-I', tmp_dir, '-o', self.pyjamas_output_dir])
124 if result != 0:
125 continue
123 shutil.rmtree(tmp_dir) 126 shutil.rmtree(tmp_dir)
124 os.chdir(cwd) 127 os.chdir(cwd)
125 return result 128 return result
126 129
127 def copy_data_files(self): 130 def copy_data_files(self):