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] fe2fc33e67
Exclude unit test which fails in Docker CI image (!4)
This commit is contained in:
parent
39fdfe51da
commit
19ba6df8f0
|
@ -58,11 +58,9 @@ stages:
|
||||||
- nproc=`grep -c '^processor' /proc/cpuinfo` || nproc=1
|
- nproc=`grep -c '^processor' /proc/cpuinfo` || nproc=1
|
||||||
- echo nproc=$nproc
|
- echo nproc=$nproc
|
||||||
- make -j $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
|
# Exclude specific unit tests which fail without being able to create
|
||||||
# loop devices in Docker images.
|
# 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/btrfs'
|
||||||
- GTEST_FILTER+=':My/SupportedFileSystemsTest.CreateAndReadUsage/lvm2pv'
|
- GTEST_FILTER+=':My/SupportedFileSystemsTest.CreateAndReadUsage/lvm2pv'
|
||||||
- GTEST_FILTER+=':My/SupportedFileSystemsTest.CreateAndReadUsage/nilfs2'
|
- GTEST_FILTER+=':My/SupportedFileSystemsTest.CreateAndReadUsage/nilfs2'
|
||||||
|
|
|
@ -22,3 +22,12 @@ do
|
||||||
chown root:disk "$name"
|
chown root:disk "$name"
|
||||||
fi
|
fi
|
||||||
done
|
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
|
||||||
|
|
Loading…
Reference in New Issue