[gparted] Add /dev/disk/by-id/ symlink in CI for test_BlockSpecial
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Add /dev/disk/by-id/ symlink in CI for test_BlockSpecial
- Date: Sat, 14 Mar 2020 15:59:56 +0000 (UTC)
commit 19ba6df8f06021cd80762f865ca7221b2f5855de
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Tue Mar 10 08:01:11 2020 +0000
Add /dev/disk/by-id/ symlink in CI for test_BlockSpecial
This previous commit [1] excluded unit test
BlockSpecialTest.NamedBlockSpecialObjectBySymlinkMatches because GNOME
GitLab Docker CI images don't have /dev/disk hierarchy and so no
symbolic links to block devices.
Create the /dev/disk/by-id directory and a symlink for this unit test to
use in the new tests/makedev.sh script.
[1] fe2fc33e67980f0b4a5bba958d257be54715f301
Exclude unit test which fails in Docker CI image (!4)
.gitlab-ci.yml | 4 +---
tests/makedev.sh | 9 +++++++++
2 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 37632bb9..d5754991 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -58,11 +58,9 @@ stages:
- nproc=`grep -c '^processor' /proc/cpuinfo` || nproc=1
- echo nproc=$nproc
- make -j $nproc
- # Exclude specific unit test which fails without /dev/disk in Docker images.
- - export GTEST_FILTER='-BlockSpecialTest.NamedBlockSpecialObjectBySymlinkMatches'
# Exclude specific unit tests which fail without being able to create
# loop devices in Docker images.
- - GTEST_FILTER+=':My/SupportedFileSystemsTest.Create/lvm2pv'
+ - export GTEST_FILTER='-My/SupportedFileSystemsTest.Create/lvm2pv'
- GTEST_FILTER+=':My/SupportedFileSystemsTest.CreateAndReadUsage/btrfs'
- GTEST_FILTER+=':My/SupportedFileSystemsTest.CreateAndReadUsage/lvm2pv'
- GTEST_FILTER+=':My/SupportedFileSystemsTest.CreateAndReadUsage/nilfs2'
diff --git a/tests/makedev.sh b/tests/makedev.sh
index 3c4166ea..735d407d 100755
--- a/tests/makedev.sh
+++ b/tests/makedev.sh
@@ -22,3 +22,12 @@ do
chown root:disk "$name"
fi
done
+
+# Create /dev/disk/by-id/SYMLINK to first block special device named in
+# /proc/partitions, if directory doesn't already exist, for
+# test_BlockSpecial.
+if test ! -e /dev/disk/by-id; then
+ mkdir -v -m 0755 -p /dev/disk/by-id/
+ dev=`awk '$1=="major" {next} NF==4 {print $4; exit}' /proc/partitions`
+ ln -v -s "/dev/$dev" "/dev/disk/by-id/gparted-$dev"
+fi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]