Skip to content

Commit

Permalink
Moved demo files to their own directory
Browse files Browse the repository at this point in the history
  • Loading branch information
yanne committed Sep 8, 2011
1 parent d693e29 commit faa4332
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 22 deletions.
6 changes: 6 additions & 0 deletions demo/README.txt
@@ -0,0 +1,6 @@
== RemoteApplications Demo ==

This is a simple demonstration using RemoteApplications library.

Up to date instructions for running the demo are online at:
http://code.google.com/p/robotframework-remoteapplications/wiki/Demo
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 0 additions & 14 deletions doc/example/README.txt

This file was deleted.

15 changes: 7 additions & 8 deletions create_example.py → package_demo.py
Expand Up @@ -8,11 +8,10 @@
import zipfile

_ROOT = os.path.abspath(os.path.dirname(__file__))
DOC = os.path.join(_ROOT, 'doc')
EXAMPLE = os.path.join(DOC, 'example')
DEMO = os.path.join(_ROOT, 'demo')
TARGET = os.path.join(_ROOT, 'target')
LIB = os.path.join(EXAMPLE, 'lib')
TESTS = os.path.join(EXAMPLE, 'robot-tests')
LIB = os.path.join(DEMO, 'lib')
TESTS = os.path.join(DEMO, 'robot-tests')


def main():
Expand All @@ -31,17 +30,17 @@ def _run_tests():
sys.exit(1)

def _run():
runner = os.path.join(EXAMPLE, 'run.py')
runner = os.path.join(DEMO, 'run.py')
return subprocess.call(['python', runner, TESTS],
shell=os.name=='nt')

def _zip_example():
zip_target_path = os.path.join(TARGET, 'remoteapplications_example.zip')
zip_target_path = os.path.join(TARGET, 'remoteapplications-demo.zip')
zip = zipfile.ZipFile(zip_target_path, 'w')
paths = _get_paths([(LIB, '*.jar'), (TESTS, '*.*'), (EXAMPLE, '*.*')])
paths = _get_paths([(LIB, '*.jar'), (TESTS, '*.*'), (DEMO, '*.*')])
print 'Zipping files...'
for path in paths:
path_in_zip_file = path.replace(DOC, '')
path_in_zip_file = path.replace(DEMO, 'remoteapplications-demo')
print ' %s' % (path_in_zip_file)
zip.write(path, path_in_zip_file)
print "Created zip file '%s'." % (zip_target_path)
Expand Down

0 comments on commit faa4332

Please sign in to comment.