Add system76-driver package from khoverlay

This commit is contained in:
Sravan Balaji
2024-05-05 08:50:24 -04:00
parent 74ab298a35
commit 5338c4e01f
5 changed files with 212 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
From: Bryan Gardiner <bog@khumba.net>
Date: 2024-01-25
Portage builds packages with a custom TMPDIR. The tests need updating not to
expect /tmp.
diff --git a/system76driver/tests/test_util.py b/system76driver/tests/test_util.py
index c2be570..7689e25 100644
--- a/system76driver/tests/test_util.py
+++ b/system76driver/tests/test_util.py
@@ -36,7 +36,9 @@ class TestFunctions(TestCase):
SubProcess.reset(mocking=False)
(tmp, tgz) = util.create_tmp_logs(func=None)
self.assertTrue(path.isdir(tmp))
- self.assertTrue(tmp.startswith('/tmp/logs.'))
+ self.assertTrue(tmp.startswith(
+ (os.environ.get('TMPDIR') or '/tmp') + '/logs.'
+ ))
self.assertEqual(
sorted(os.listdir(tmp)),
['system76-logs', 'system76-logs.tgz'],