seattletestbed / common Goto Github PK
View Code? Open in Web Editor NEWCommon files used across SeattleTestbed repos
License: MIT License
Common files used across SeattleTestbed repos
License: MIT License
utf
folder is to be removed from common
repo, and hence, config_initialize and config_build files should include separate utf
repo for cloning and copying into target directory.
From what I can tell, the functionality provided by testportfiller.py
is available from build_component.py
's replace_string
function. Even the code of both is almost identical.
We should replace testportfiller
's functionality with replace_string
's. (In the long run, we should also redesign how port numbers for sockets are assigned in unit tests.)
Some unit tests (such as ut_nm_validate_connection_limit.r2py and ut_nm_validate_connection_timeout.r2py) need use a third connport. testportfiller
must fill this in, or else the unit tests fail.
Currently, build_component.py
removes the contents of the build target directory before copying over files anew. This can hurt if you happen to specify the wrong target dir, or have files you created / edited in the target dir but did not commit them yet.
Since it's trivial to clean / recreate the target dir before you build yourself, I think a good thing to do is to require the person starting the build perform these steps consciously. build_component
should only complain if the target dir is not empty, but not attempt to clean it.
@XuefengHuang provided a patch to the (outdated) preparetest
script providing that functionality, see SeattleTestbed/dist#143.
build_component.py
currently lacks the functionality to copy files to subdirectories of the build target dir. Similar to #7, the old build harness allows this, e.g. to create subfolders for the different Repy runtimes in a Seattle installer.
I think we could add the subdir as an optional second or third argument in config_build.txt
, like
# This one would be for building a component
seattlelib_v2/* subdir_for_seattlelib
# And that's the syntax for preparing tests
test repy_v2/* subdir_for_repytests
The unit tests run via ´utf´, the Seattle unit test framework, require special resource restrictions files for various tests (e.g. to see whether the restrictions are actually enforced, or to allow a large number of sockets, etc.).
These restrictions files should be part of utf
however, not common
. A (probably very generous) default restrictions file should be included in the repy_v2
directory to make that a reasonable runtime environment.
Git can store file mode bits so that (e.g.) executable files can be marked executable. This script needs precisely that, but the copying routines in build_component.py
don't support copying over file mode bits.
ut_utftests_test_pragma_repy.py needs Repy to work correctly. This should be included as a dependency so that the unittests can run.
Currently (c1b90ad), build_component.py
issues this error message when it cannot find the config_build.txt
build configuration file:
albert$ python build_component.py
Building into /Users/albert/RUNNABLE
Traceback (most recent call last):
File "build_component.py", line 389, in <module>
main()
File "build_component.py", line 312, in main
config_file = open("scripts/config_build.txt")
IOError: [Errno 2] No such file or directory: 'scripts/config_build.txt'
This description is apt, but not too helpful in order to rectify the problem (unless, perhaps, you know the internals of the new build system). The error message should explain the problem nicely, and point the user to the relevant piece of the build instructions.
build_component.py
currently lacks the functionality to copy over file trees to the target dir. The old preparetest
, build_demokit
and friends (see SeattleTestbed/dist) require this functionality.
Let's add a tree
(or similar) keyword that we can use in config_build.txt
that allows for that.
Are custom build instructions in README format needed for this component? config_build.py
indicates that this component is a special case: https://github.com/SeattleTestbed/common/blob/master/scripts/config_build.txt#L1-L10. However, running the build scripts does not produce any meaningful results (untestable or raises warnings/errors). There are two scripts
folders and it is unclear which one is intended. I created a tests
folder and moved things around (and got tests to run, albeit with some unit tests failing), but I'm not sure if this is correct due to the comments in config_initialize.py
(https://github.com/SeattleTestbed/common/blob/master/scripts/config_initialize.txt#L1-L28)
If you type ````python utf.py -m foo'''' you will see something like:
Justins-MacBook-Air:build justincappos$ python utf.py -m foo
Testing module: foo
Justins-MacBook-Air:build justincappos$
''''
This is despite the fact that foo does not exist as a module. The module should print an error when given an empty module.
Currently, initialize.py
will fail (due to git clone
's nonzero return value) if subdirs exist in DEPENDENCIES
that would also be created from freshly checking out dependent repos.
I think we should add an option so that existing subdirs are skipped. This gives you a little more flexibility in the build process if you know what you do, e.g. copy over huge repos that you already have in order to save time / bandwidth, or build from repos you don't want to / cannot push to GitHub.
build_component.py
should first read the build configuration file, config_build.txt
, before going and creating the target directory and subdirs. Even if the build config is missing (see #13), the default RUNNABLE
directory and RepyV1/2
subdirs are created.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.