<commit_before>#!/usr/bin/python3

tests = [
    'tests/test-reactor',
    'tests/fileiotest',
    'tests/virtiotest',
    'tests/l3_test',
    'tests/ip_test',
    'tests/timertest',
    'tests/tcp_test',
    'tests/futures_test',
    ]

apps = [
    'apps/httpd/httpd',
    'apps/seastar/seastar',
    ]

all_artifacts = apps + tests

libnet = [
    'net/virtio.cc',
    'net/net.cc',
    'net/ip.cc',
    'net/ethernet.cc',
    'net/arp.cc',
    'net/stack.cc',
    'net/packet.cc',
    'net/ip_checksum.cc',
    ]

core = [
    'core/reactor.cc',
    'core/posix.cc',
    'core/memory.cc',
    ]

deps = {
    'apps/seastar/seastar': ['apps/seastar/main.cc'] + core,
    'tests/test-reactor': ['tests/test-reactor.cc'] + core,
    'apps/httpd/httpd': ['apps/httpd/httpd.cc', 'apps/httpd/request_parser.rl'] + libnet + core,
    'tests/fileiotest': ['tests/fileiotest.cc'] + core,
    'tests/virtiotest': ['tests/virtiotest.cc'] + core + libnet,
    'tests/l3_test': ['tests/l3_test.cc'] + core + libnet,
    'tests/ip_test': ['tests/ip_test.cc'] + core + libnet,
    'tests/tcp_test': ['tests/tcp_test.cc'] + core + libnet,
    'tests/timertest': ['tests/timertest.cc'] + core,
    'tests/futures_test': ['tests/futures_test.cc'] + core,
}

modes = {
    'debug': {
        'sanitize': '-fsanitize=address -fsanitize=leak -fsanitize=undefined',
        'opt': '-O0 -DDEBUG',
        'libs': '-lubsan -lasan',
    },
    'release': {
        'sanitize': '',
        'opt': '-O2',
        'libs': '',
    },
}

libs = '-laio -lboost_program_options -lboost_system -lstdc++'

import os, os.path, textwrap, argparse, sys

configure_args = str.join(' ', sys.argv[1:])<commit_msg>build: properly quote configure parameters<commit_after>#!/usr/bin/python3

tests = [
    'tests/test-reactor',
    'tests/fileiotest',
    'tests/virtiotest',
    'tests/l3_test',
    'tests/ip_test',
    'tests/timertest',
    'tests/tcp_test',
    'tests/futures_test',
    ]

apps = [
    'apps/httpd/httpd',
    'apps/seastar/seastar',
    ]

all_artifacts = apps + tests

libnet = [
    'net/virtio.cc',
    'net/net.cc',
    'net/ip.cc',
    'net/ethernet.cc',
    'net/arp.cc',
    'net/stack.cc',
    'net/packet.cc',
    'net/ip_checksum.cc',
    ]

core = [
    'core/reactor.cc',
    'core/posix.cc',
    'core/memory.cc',
    ]

deps = {
    'apps/seastar/seastar': ['apps/seastar/main.cc'] + core,
    'tests/test-reactor': ['tests/test-reactor.cc'] + core,
    'apps/httpd/httpd': ['apps/httpd/httpd.cc', 'apps/httpd/request_parser.rl'] + libnet + core,
    'tests/fileiotest': ['tests/fileiotest.cc'] + core,
    'tests/virtiotest': ['tests/virtiotest.cc'] + core + libnet,
    'tests/l3_test': ['tests/l3_test.cc'] + core + libnet,
    'tests/ip_test': ['tests/ip_test.cc'] + core + libnet,
    'tests/tcp_test': ['tests/tcp_test.cc'] + core + libnet,
    'tests/timertest': ['tests/timertest.cc'] + core,
    'tests/futures_test': ['tests/futures_test.cc'] + core,
}

modes = {
    'debug': {
        'sanitize': '-fsanitize=address -fsanitize=leak -fsanitize=undefined',
        'opt': '-O0 -DDEBUG',
        'libs': '-lubsan -lasan',
    },
    'release': {
        'sanitize': '',
        'opt': '-O2',
        'libs': '',
    },
}

libs = '-laio -lboost_program_options -lboost_system -lstdc++'

import os, os.path, textwrap, argparse, sys, shlex

configure_args = str.join(' ', [shlex.quote(x) for x in sys.argv[1:]])
{'fraction_non_alphanumeric': 0.2050906963136337, 'fraction_numerical': 0.004095962551199532, 'mean_word_length': 2.7862679955703213, 'pattern_counts': {'":': 0, '<': 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': '4956609', 'n_tokens_mistral': 1400, 'n_tokens_neox': 1401, 'n_words': 202}