linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] ktest: update ndctl and xfstests
@ 2018-06-15 21:25 Matthew Wilcox
  0 siblings, 0 replies; only message in thread
From: Matthew Wilcox @ 2018-06-15 21:25 UTC (permalink / raw)
  To: Kent Overstreet, linux-fsdevel


This makes them part of the root image.  I didn't see any existing code
for automatically installing these things.  There's no attempt to check
and magically install dependencies ... but I do skip rebuilding them if
they haven't been updated since last git pull.

diff --git a/root_image b/root_image
index 42f9293..6861949 100755
--- a/root_image
+++ b/root_image
@@ -195,12 +195,50 @@ ZZ
     sed -i s/$/-kvm/ "$MNT/etc/hostname"
 }
 
+update_git()
+{
+    if [ -d $1 ]; then
+	cd $1
+	git fetch
+	if cmp -n40 -s .git/FETCH_HEAD .git/refs/heads/master; then
+	    cd ..
+	    exit 0;
+	fi
+	git merge FETCH_HEAD
+    else
+	git clone $2
+	cd $1
+    fi
+    case $1 in
+	ndctl)
+	    ./autogen.sh
+	    ./configure CFLAGS='-g -O2' --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib
+	    ;;
+    esac
+    make
+    make DESTDIR=$MNT install
+    case $1 in
+	xfstests-dev)
+# need to make these not fail if the user already exists -- help?
+#	    _chroot "$MNT" useradd fsgqa
+#	    _chroot "$MNT" groupadd fsgqa
+#	    _chroot "$MNT" useradd 123456-fsgqa
+	    ;;
+    esac
+    cd ..
+}
+
 update_packages()
 {
     _chroot "$MNT" apt update
     _chroot "$MNT" apt upgrade -y
     _chroot "$MNT" apt install -y "${PACKAGES[@]}"
     rm -f "$MNT/var/cache/apt/archives/*.deb"
+
+    # ndctl is not yet available as a Debian package
+    update_git ndctl https://github.com/pmem/ndctl.git
+    # we want the latest version of xfstests from git
+    update_git xfstests-dev
 }
 
 trim_image()

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-06-15 21:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-15 21:25 [RFC] ktest: update ndctl and xfstests Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).