Git Product home page Git Product logo

common's People

Contributors

aaaaalbert avatar asm582 avatar choksi81 avatar justincappos avatar priyam3nidhi avatar vladimir-v-diaz avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

common's Issues

Remove `testportfiller.py` in favor of `build_component.replace_string()`

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.)

build_component.py should not write over populated target directories

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 doesn't copy to subdirs of the target directory

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

Remove utf-related restrictions files from `common`

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.

Need better error message if build config is missing

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.

Specific Build Instructions for the `common` Component

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)

utf should print an error when given an unknown module

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.   

initialize.py should let you skip existing DEPENDENCIES/ subdirs

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.

Should check build config before creating target dirs

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.