]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: don't install test-network-generator-conversion.sh w/o networkd
authorFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 20 Oct 2021 17:43:34 +0000 (19:43 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 20 Oct 2021 21:04:45 +0000 (22:04 +0100)
otherwise TEST-02 will fail:

```
=== Failed test log ===
--- test-network-generator-conversion.sh begin ---
+ [[ -n '' ]]
+ [[ -x /usr/lib/systemd/systemd-network-generator ]]
+ [[ -x /lib/systemd/systemd-network-generator ]]
+ exit 1
--- test-network-generator-conversion.sh end ---
```

Before:
```
$ meson build -Dnetworkd=false -Dinstall-tests=true
$ ninja -C build
$ DESTDIR=$PWD/test-install ninja -C build install
$ find test-install/ -name test-network-generator-conversion.sh
test-install/usr/lib/systemd/tests/test-network-generator-conversion.sh
```

After:
```
$ find test-install/ -name test-network-generator-conversion.sh
<no output>
```

test/meson.build

index b8335fb50f002dd89fd19b0dc7cfee318fc692f4..a5bfbb74621ff38d8a336a4f19b3df60cf3c4a5e 100644 (file)
@@ -100,9 +100,12 @@ if install_tests
         install_data('run-unit-tests.py',
                      install_mode : 'rwxr-xr-x',
                      install_dir : testsdir)
-        install_data('test-network-generator-conversion.sh',
-                     install_mode : 'rwxr-xr-x',
-                     install_dir : testsdir)
+
+        if conf.get('ENABLE_NETWORKD') == 1
+                install_data('test-network-generator-conversion.sh',
+                             install_mode : 'rwxr-xr-x',
+                             install_dir : testsdir)
+        endif
 endif
 
 ############################################################