# The syntax for a testsuite is "-- TEST --" on a single line, followed # by the name of the test, the environment it needs and the command to run, all # three separated by newlines. All other lines in the output are considered # comments. import os from selftesthelpers import bindir, srcdir, python from selftesthelpers import planpythontestsuite, samba4srcdir from selftesthelpers import plantestsuite, bbdir from selftesthelpers import configuration, valgrindify from selftesthelpers import skiptestsuite try: config_h = os.environ["CONFIG_H"] except KeyError: samba4bindir = bindir() config_h = os.path.join(samba4bindir, "default/include/config.h") # check available features config_hash = dict() f = open(config_h, 'r') try: lines = f.readlines() config_hash = dict((x[0], ' '.join(x[1:])) for x in map(lambda line: line.strip().split(' ')[1:], list(filter(lambda line: (line[0:7] == '#define') and (len(line.split(' ')) > 2), lines)))) finally: f.close() have_man_pages_support = ("XSLTPROC_MANPAGES" in config_hash) with_pam = ("WITH_PAM" in config_hash)
# The syntax for a testsuite is "-- TEST --" on a single line, followed # by the name of the test, the environment it needs and the command to run, all # three separated by newlines. All other lines in the output are considered # comments. import os from selftesthelpers import bindir, srcdir, python from selftesthelpers import planpythontestsuite, samba4srcdir from selftesthelpers import plantestsuite, bbdir from selftesthelpers import configuration, valgrindify from selftesthelpers import skiptestsuite try: config_h = os.environ["CONFIG_H"] except KeyError: samba4bindir = bindir() config_h = os.path.join(samba4bindir, "default/include/config.h") # check available features config_hash = dict() f = open(config_h, 'r') try: lines = f.readlines() config_hash = dict((x[0], ' '.join(x[1:])) for x in map( lambda line: line.strip().split(' ')[1:], list( filter( lambda line: (line[0:7] == '#define') and (len(line.split(' ')) > 2), lines)))) finally: f.close()
# The syntax for a testsuite is "-- TEST --" on a single line, followed # by the name of the test, the environment it needs and the command to run, all # three separated by newlines. All other lines in the output are considered # comments. import os from selftesthelpers import bindir, srcdir, python from selftesthelpers import planpythontestsuite, samba4srcdir from selftesthelpers import plantestsuite, bbdir from selftesthelpers import configuration, valgrindify from selftesthelpers import skiptestsuite try: config_h = os.environ["CONFIG_H"] except KeyError: samba4bindir = bindir() config_h = os.path.join(samba4bindir, "default/include/config.h") # check available features config_hash = dict() f = open(config_h, 'r') try: lines = f.readlines() config_hash = dict((x[0], ' '.join(x[1:])) for x in map(lambda line: line.strip().split(' ')[1:], list(filter(lambda line: (line[0:7] == '#define') and (len(line.split(' ')) > 2), lines)))) finally: f.close() have_man_pages_support = ("XSLTPROC_MANPAGES" in config_hash) with_pam = ("WITH_PAM" in config_hash)
# The syntax for a testsuite is "-- TEST --" on a single line, followed # by the name of the test, the environment it needs and the command to run, all # three separated by newlines. All other lines in the output are considered # comments. import os from selftesthelpers import bindir, srcdir, python from selftesthelpers import planpythontestsuite, samba4srcdir from selftesthelpers import plantestsuite, bbdir from selftesthelpers import configuration, valgrindify from selftesthelpers import skiptestsuite try: config_h = os.environ["CONFIG_H"] except KeyError: samba4bindir = bindir() config_h = os.path.join(samba4bindir, "default/include/config.h") # check available features config_hash = dict() f = open(config_h, 'r') try: lines = f.readlines() config_hash = dict((x[0], ' '.join(x[1:])) for x in map( lambda line: line.strip().split(' ')[1:], list( filter( lambda line: (line[0:7] == '#define') and (len(line.split(' ')) > 2), lines)))) finally: f.close()
# test Samba performance. # # These tests are not intended to exercise aspect of Samba, but # perform common simple functions or to ascertain performance. # # The syntax for a testsuite is "-- TEST --" on a single line, followed # by the name of the test, the environment it needs and the command to run, all # three separated by newlines. All other lines in the output are considered # comments. import os from selftesthelpers import source4dir, bindir, python, plantestsuite_loadlist samba4srcdir = source4dir() samba4bindir = bindir() plantestsuite_loadlist("samba4.ldap.ad_dc_performance.python(ad_dc_ntvfs)", "ad_dc_ntvfs", [python, os.path.join(samba4srcdir, "dsdb/tests/python/ad_dc_performance.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT']) plantestsuite_loadlist("samba4.ndr_pack_performance.python(ad_dc_ntvfs)", "ad_dc_ntvfs", [python, os.path.join(samba4srcdir, "dsdb/tests/python/ndr_pack_performance.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN',