<commit_before>#!/usr/bin/python
import os, subprocess, sys
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, 'common')))
from test_common import *

ec2 = 5

def test(opts, port, test_dir):

    # Figure out where the memcached scripts are located
    memcached_suite_dir = os.path.join(os.path.dirname(__file__), "memcached_suite")

    # The memcached test scripts now get the port as an environment variable (instead of running
    # the server themselves).
    os.environ["RUN_PORT"] = str(port)
    os.environ["PERLLIB"] = os.path.join(memcached_suite_dir, "lib") + ":" + os.getenv("PERLLIB", "")

    proc = subprocess.Popen(os.path.join(memcached_suite_dir, opts["suite-test"]))
    assert proc.wait() == 0

if __name__ == "__main__":
    op = make_option_parser()
    op["suite-test"] = StringFlag("--suite-test")
    auto_server_test_main(test, op.parse(sys.argv), timeout=360)<commit_msg>Make memcached suite test failure message a bit friendlier. Closes #228.<commit_after>#!/usr/bin/python
import os, subprocess, sys
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, 'common')))
from test_common import *

ec2 = 5

def test(opts, port, test_dir):

    # Figure out where the memcached scripts are located
    memcached_suite_dir = os.path.join(os.path.dirname(__file__), "memcached_suite")

    # The memcached test scripts now get the port as an environment variable (instead of running
    # the server themselves).
    os.environ["RUN_PORT"] = str(port)
    os.environ["PERLLIB"] = os.path.join(memcached_suite_dir, "lib") + ":" + os.getenv("PERLLIB", "")

    proc = subprocess.Popen(os.path.join(memcached_suite_dir, opts["suite-test"]))
    suite_test_succeeded = proc.wait() == 0
    assert suite_test_succeeded

if __name__ == "__main__":
    op = make_option_parser()
    op["suite-test"] = StringFlag("--suite-test")
    auto_server_test_main(test, op.parse(sys.argv), timeout=360)
{'fraction_non_alphanumeric': 0.1435068216270844, 'fraction_numerical': 0.007579585649317837, 'mean_word_length': 4.561797752808989, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2538477', 'n_tokens_mistral': 690, 'n_tokens_neox': 667, 'n_words': 147}