Skip to content
This repository was archived by the owner on Oct 1, 2025. It is now read-only.

Conversation

@XuefengHuang
Copy link

I replace repyimporter with dy_import_module and add examples diretory in config_build.txt to test if it works fine.

Port experimentlib.py to use RepyV2
@XuefengHuang
Copy link
Author

This is my test result on mac os x machine( Created /path/to/user.publickey /path/to/user.privatekeybefore testing because run_experimentlib_examples.py defines it ):

huangxuefengdeMacBook-Pro:seattletest Xuefeng$ git clone https://github.com/XuefengHuang/experimentmanager
Cloning into 'experimentmanager'...
remote: Counting objects: 189, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 189 (delta 1), reused 0 (delta 0)
Receiving objects: 100% (189/189), 74.98 KiB | 0 bytes/s, done.
Resolving deltas: 100% (98/98), done.
Checking connectivity... done.
huangxuefengdeMacBook-Pro:seattletest Xuefeng$ cd experimentmanager/scripts
huangxuefengdeMacBook-Pro:scripts Xuefeng$ python initialize.py
Checking out repo from https://github.com/SeattleTestbed/portability ...
Done!
Checking out repo from https://github.com/SeattleTestbed/repy_v2 ...
Done!
Checking out repo from https://github.com/SeattleTestbed/seattlelib_v2 ...
Done!
Checking out repo from https://github.com/SeattleTestbed/nodemanager ...
Done!
Checking out repo from https://github.com/SeattleTestbed/common ...
Done!
Checking out repo from https://github.com/SeattleTestbed/utf ...
Done!
huangxuefengdeMacBook-Pro:scripts Xuefeng$ python build.py -t
Building into /Users/huangxuefeng/Documents/seattletest/experimentmanager/RUNNABLE
Done building!
huangxuefengdeMacBook-Pro:scripts Xuefeng$ cd ../runnable
huangxuefengdeMacBook-Pro:runnable Xuefeng$ python
Python 2.7.8 (v2.7.8:ee879c0ffa11, Jun 29 2014, 21:07:35) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import run_experimentlib_examples
>>> run_experimentlib_examples.test_lookup_node_locations()
Number of nodes advertising their location under this key: 0
>>> run_experimentlib_examples.test_download_files()
Number of advertising nodes: 0
Number of active vessels: 0
Done.
>>> run_experimentlib_examples.test_get_logs()
Number of advertising nodes: 0
Number of active vessels: 0
Done.
>>> run_experimentlib_examples.test_run_program()
Number of advertising nodes: 0
Number of active vessels: 0
Done.

@aaaaalbert
Copy link
Contributor

I'd love to see this tested with active nodes. Can you just acquire a handful from the clearinghouse and retry?

@XuefengHuang
Copy link
Author

Sure, I have updated my test results.

Xuefengs-MacBook-Pro:RUNNABLE Xuefeng$ python
Python 2.7.8 (v2.7.8:ee879c0ffa11, Jun 29 2014, 21:07:35) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import run_experimentlib_examples
>>> run_experimentlib_examples.test_lookup_node_locations()
Number of nodes advertising their location under this key: 4
131.247.2.246:2888
75.130.96.13:2888
204.56.0.138:1224
137.132.80.106:1224
>>> run_experimentlib_examples.test_download_files()
Number of advertising nodes: 4
Number of active vessels: 4
Files on 131.247.2.246:2888 v4: []
Files on 204.56.0.138:1224 v6: []
Files on 75.130.96.13:2888 v8: ['example.1.1.repy', 'helloworld.txt']
Downloaded ./75.130.96.13_2888_v8/example.1.1.repy
Downloaded ./75.130.96.13_2888_v8/helloworld.txt
Files on 137.132.80.106:1224 v10: []
Done.
>>> run_experimentlib_examples.test_get_logs()
Number of advertising nodes: 4
Number of active vessels: 4
====================================================================
Log from 75.130.96.13:2888 v8
========================================
Running program: example.1.1.repy
Arguments: []
========================================
Hello World

====================================================================
Log from 131.247.2.246:2888 v4

====================================================================
Log from 204.56.0.138:1224 v6

====================================================================
Log from 137.132.80.106:1224 v10

Done.
>>> run_experimentlib_examples.test_run_program()
Number of advertising nodes: 4
Number of active vessels: 4
Uploaded myprogram.py to 75.130.96.13:2888 vessel v8
Program started on 75.130.96.13:2888 vessel v8
Uploaded myprogram.py to 131.247.2.246:2888 vessel v4
Program started on 131.247.2.246:2888 vessel v4
Uploaded myprogram.py to 137.132.80.106:1224 vessel v10
Program started on 137.132.80.106:1224 vessel v10
Uploaded myprogram.py to 204.56.0.138:1224 vessel v6
Program started on 204.56.0.138:1224 vessel v6
Done.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants