mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
Move tools/generate-fixtures to tools/setup/.
This commit is contained in:
@@ -36,7 +36,7 @@ for file in args:
|
||||
|
||||
os.chdir(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..'))
|
||||
|
||||
subprocess.check_call('tools/generate-fixtures')
|
||||
subprocess.check_call('tools/setup/generate-fixtures')
|
||||
|
||||
subprocess.check_call('tools/setup/generate-test-credentials')
|
||||
|
||||
|
||||
@@ -3,5 +3,5 @@ set -e
|
||||
set -x
|
||||
|
||||
# This is a really simple wrapper script, pretty much for documenting clarity
|
||||
"`dirname "$0"`/../tools/generate-fixtures" --force
|
||||
"`dirname "$0"`/../tools/setup/generate-fixtures" --force
|
||||
|
||||
|
||||
@@ -12,25 +12,25 @@ if [ "$template_grep_error_code" == "0" ]; then
|
||||
if [ -e zerver/fixtures/migration-status ] &&
|
||||
cmp -s zerver/fixtures/available-migrations zerver/fixtures/migration-status &&
|
||||
[ "$1" != "--force" ]; then
|
||||
"$(dirname "$0")/../scripts/setup/terminate-psql-sessions" zulip zulip_test zulip_test_base zulip_test_template
|
||||
"$(dirname "$0")/../../scripts/setup/terminate-psql-sessions" zulip zulip_test zulip_test_base zulip_test_template
|
||||
psql -h localhost postgres zulip_test << EOF
|
||||
DROP DATABASE IF EXISTS zulip_test;
|
||||
CREATE DATABASE zulip_test TEMPLATE zulip_test_template;
|
||||
EOF
|
||||
sh "$(dirname "$0")/../scripts/setup/flush-memcached"
|
||||
sh "$(dirname "$0")/../../scripts/setup/flush-memcached"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
mkdir -p zerver/fixtures
|
||||
|
||||
"$(dirname "$0")/../scripts/setup/terminate-psql-sessions" zulip zulip_test zulip_test_base zulip_test_template
|
||||
"$(dirname "$0")/../../scripts/setup/terminate-psql-sessions" zulip zulip_test zulip_test_base zulip_test_template
|
||||
|
||||
psql -h localhost postgres zulip_test <<EOF
|
||||
DROP DATABASE IF EXISTS zulip_test;
|
||||
CREATE DATABASE zulip_test TEMPLATE zulip_test_base;
|
||||
EOF
|
||||
sh "$(dirname "$0")/../scripts/setup/flush-memcached"
|
||||
sh "$(dirname "$0")/../../scripts/setup/flush-memcached"
|
||||
|
||||
python manage.py migrate --noinput --settings=zproject.test_settings
|
||||
migration_status "zerver/fixtures/migration-status"
|
||||
@@ -43,7 +43,7 @@ if __name__ == "__main__":
|
||||
prof = cProfile.Profile()
|
||||
prof.enable()
|
||||
|
||||
subprocess.call(os.path.join(TOOLS_DIR, 'generate-fixtures'))
|
||||
subprocess.call(os.path.join(TOOLS_DIR, 'setup', 'generate-fixtures'))
|
||||
|
||||
TestRunner = get_runner(settings)
|
||||
test_runner = TestRunner()
|
||||
|
||||
Reference in New Issue
Block a user