mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) move data engine code to core
Summary: this moves sandbox/grist to core, and adds a requirements.txt file for reconstructing the content of sandbox/thirdparty. Test Plan: existing tests pass. Tested core functionality manually. Tested docker build manually. Reviewers: dsagal Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D2563
This commit is contained in:
33
sandbox/grist/runtests.py
Normal file
33
sandbox/grist/runtests.py
Normal file
@@ -0,0 +1,33 @@
|
||||
"""
|
||||
Helper to run Python unittests in the sandbox. They can be run directly as follows:
|
||||
|
||||
./sandbox/nacl/bin/run -E PYTHONPATH=/thirdparty python -m unittest discover -v -s /grist
|
||||
|
||||
This modules makes this a bit easier, and adds support for --xunit option, needed for running
|
||||
tests under 'arc unit' and under Jenkins.
|
||||
|
||||
./sandbox/nacl/bin/run python /grist/runtests.py [--xunit]
|
||||
"""
|
||||
import os
|
||||
import sys
|
||||
import unittest
|
||||
sys.path.append('/thirdparty')
|
||||
|
||||
def main():
|
||||
# Change to the directory of this file (/grist in sandbox), to discover everything under it.
|
||||
os.chdir(os.path.dirname(__file__))
|
||||
|
||||
argv = sys.argv[:]
|
||||
test_runner = None
|
||||
if "--xunit" in argv:
|
||||
import xmlrunner
|
||||
argv.remove("--xunit")
|
||||
test_runner = xmlrunner.XMLTestRunner(stream=sys.stdout)
|
||||
|
||||
if all(arg.startswith("-") for arg in argv[1:]):
|
||||
argv.insert(1, "discover")
|
||||
|
||||
unittest.main(module=None, argv=argv, testRunner=test_runner)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Reference in New Issue
Block a user