mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
This causes `upgrade-zulip-from-git`, as well as a no-option run of `tools/build-release-tarball`, to produce a Zulip install running Python 3, rather than Python 2. In particular this means that the virtualenv we create, in which all application code runs, is Python 3. One shebang line, on `zulip-ec2-configure-interfaces`, explicitly keeps Python 2, and at least one external ops script, `wal-e`, also still runs on Python 2. See discussion on the respective previous commits that made those explicit. There may also be some other third-party scripts we use, outside of this source tree and running outside our virtualenv, that still run on Python 2.
49 lines
1.2 KiB
Python
Executable File
49 lines
1.2 KiB
Python
Executable File
#!/usr/bin/env python3
|
|
from __future__ import print_function
|
|
from __future__ import absolute_import
|
|
import optparse
|
|
import os
|
|
import sys
|
|
import subprocess
|
|
|
|
import time
|
|
|
|
|
|
# check for the venv
|
|
from lib import sanity_check
|
|
sanity_check.check_venv(__file__)
|
|
|
|
import requests
|
|
|
|
parser = optparse.OptionParser()
|
|
parser.add_option('--force', default=False,
|
|
action="store_true",
|
|
help='Run tests despite possible problems.')
|
|
(options, args) = parser.parse_args()
|
|
|
|
TOOLS_DIR = os.path.dirname(os.path.abspath(__file__))
|
|
sys.path.insert(0, os.path.dirname(TOOLS_DIR))
|
|
|
|
from tools.lib.test_server import test_server_running
|
|
|
|
subprocess.check_call(['mkdir', '-p', 'var/help-documentation'])
|
|
|
|
LOG_FILE = 'var/help-documentation/server.log'
|
|
external_host = "localhost:9981"
|
|
|
|
with test_server_running(options.force, external_host, log_file=LOG_FILE, dots=True, use_db=False):
|
|
ret = subprocess.call(('scrapy', 'crawl_with_status', 'help_documentation_crawler'),
|
|
cwd='tools/documentation_crawler')
|
|
|
|
if ret != 0:
|
|
print("\033[0;91m")
|
|
print("Failed")
|
|
print("\033[0m")
|
|
else:
|
|
print("\033[0;92m")
|
|
print("Passed!")
|
|
print("\033[0m")
|
|
|
|
|
|
sys.exit(ret)
|