1{
2 lib,
3 bash,
4 buildPythonPackage,
5 cliff,
6 debtcollector,
7 defusedxml,
8 fetchPypi,
9 fixtures,
10 hacking,
11 jsonschema,
12 netaddr,
13 oslo-concurrency,
14 oslo-config,
15 oslo-log,
16 oslo-serialization,
17 oslo-utils,
18 oslotest,
19 paramiko,
20 pbr,
21 prettytable,
22 python,
23 pythonOlder,
24 pyyaml,
25 setuptools,
26 stestr,
27 stevedore,
28 subunit,
29 testscenarios,
30 testtools,
31 urllib3,
32}:
33
34buildPythonPackage rec {
35 pname = "tempest";
36 version = "45.0.0";
37 pyproject = true;
38
39 src = fetchPypi {
40 inherit pname version;
41 hash = "sha256-z+DJ5ODgWaIcYM0orXYA/Ci0hrzfSGkOZt/z7L3DWJs=";
42 };
43
44 pythonRelaxDeps = [ "defusedxml" ];
45
46 build-system = [ setuptools ];
47
48 dependencies = [
49 cliff
50 debtcollector
51 defusedxml
52 fixtures
53 jsonschema
54 netaddr
55 oslo-concurrency
56 oslo-config
57 oslo-log
58 oslo-serialization
59 oslo-utils
60 paramiko
61 pbr
62 prettytable
63 pyyaml
64 stestr
65 stevedore
66 subunit
67 testscenarios
68 testtools
69 urllib3
70 ];
71
72 nativeCheckInputs = [
73 hacking
74 oslotest
75 stestr
76 ];
77
78 checkPhase = ''
79 # Tests expect these applications available as such.
80 mkdir -p bin
81 export PATH="$PWD/bin:$PATH"
82 printf '#!${bash}/bin/bash\nexec ${python.interpreter} -m tempest.cmd.main "$@"\n' > bin/tempest
83 printf '#!${bash}/bin/bash\nexec ${python.interpreter} -m tempest.cmd.subunit_describe_calls "$@"\n' > bin/subunit-describe-calls
84 chmod +x bin/*
85
86 stestr --test-path tempest/tests run -e <(echo "
87 tempest.tests.cmd.test_cleanup.TestTempestCleanup.test_load_json_resource_list
88 tempest.tests.cmd.test_cleanup.TestTempestCleanup.test_load_json_saved_state
89 tempest.tests.cmd.test_cleanup.TestTempestCleanup.test_take_action_got_exception
90 tempest.tests.lib.cli.test_execute.TestExecute.test_execute_with_prefix
91 ")
92 '';
93
94 pythonImportsCheck = [ "tempest" ];
95
96 meta = with lib; {
97 description = "OpenStack integration test suite that runs against live OpenStack cluster and validates an OpenStack deployment";
98 homepage = "https://github.com/openstack/tempest";
99 license = licenses.asl20;
100 mainProgram = "tempest";
101 teams = [ teams.openstack ];
102 };
103}