|
|
26ccd9 |
From 351badda9e5b6454e56f31992e9325c4656680bd Mon Sep 17 00:00:00 2001
|
|
|
26ccd9 |
From: Vishal Verma <vishal.l.verma@intel.com>
|
|
|
26ccd9 |
Date: Fri, 14 Jan 2022 18:32:29 -0700
|
|
|
26ccd9 |
Subject: [PATCH 086/217] ndctl: update README.md for meson build
|
|
|
26ccd9 |
|
|
|
26ccd9 |
Update the README to replace the autotools build and test instructions
|
|
|
26ccd9 |
with meson equivalents. Also provide an example for setting meson
|
|
|
26ccd9 |
configuration options by illustrating the destructive unit tests use
|
|
|
26ccd9 |
case.
|
|
|
26ccd9 |
|
|
|
26ccd9 |
Link: https://lore.kernel.org/r/20220115013229.1604139-1-vishal.l.verma@intel.com
|
|
|
26ccd9 |
Cc: Dan Williams <dan.j.williams@intel.com>
|
|
|
26ccd9 |
Reported-by: Alison Schofield <alison.schofield@intel.com>
|
|
|
26ccd9 |
Reported-by: Jane Chu <jane.chu@oracle.com>
|
|
|
26ccd9 |
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
|
|
|
26ccd9 |
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
|
|
|
26ccd9 |
---
|
|
|
26ccd9 |
README.md | 33 ++++++++++++++++++++++-----------
|
|
|
26ccd9 |
1 file changed, 22 insertions(+), 11 deletions(-)
|
|
|
26ccd9 |
|
|
|
26ccd9 |
diff --git a/README.md b/README.md
|
|
|
26ccd9 |
index 6f36a6d..f3fe65b 100644
|
|
|
26ccd9 |
--- a/README.md
|
|
|
26ccd9 |
+++ b/README.md
|
|
|
26ccd9 |
@@ -9,11 +9,14 @@ Build
|
|
|
26ccd9 |
=====
|
|
|
26ccd9 |
|
|
|
26ccd9 |
```
|
|
|
26ccd9 |
-./autogen.sh
|
|
|
26ccd9 |
-./configure CFLAGS='-g -O2' --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib64
|
|
|
26ccd9 |
-make
|
|
|
26ccd9 |
-make check
|
|
|
26ccd9 |
-sudo make install
|
|
|
26ccd9 |
+meson setup build;
|
|
|
26ccd9 |
+meson compile -C build;
|
|
|
26ccd9 |
+```
|
|
|
26ccd9 |
+
|
|
|
26ccd9 |
+Optionally, to install:
|
|
|
26ccd9 |
+
|
|
|
26ccd9 |
+```
|
|
|
26ccd9 |
+meson install -C build
|
|
|
26ccd9 |
```
|
|
|
26ccd9 |
|
|
|
26ccd9 |
There are a number of packages required for the build steps that may not
|
|
|
26ccd9 |
@@ -34,7 +37,7 @@ https://nvdimm.wiki.kernel.org/start
|
|
|
26ccd9 |
|
|
|
26ccd9 |
Unit Tests
|
|
|
26ccd9 |
==========
|
|
|
26ccd9 |
-The unit tests run by `make check` require the nfit_test.ko module to be
|
|
|
26ccd9 |
+The unit tests run by `meson test` require the nfit_test.ko module to be
|
|
|
26ccd9 |
loaded. To build and install nfit_test.ko:
|
|
|
26ccd9 |
|
|
|
26ccd9 |
1. Obtain the kernel source. For example,
|
|
|
26ccd9 |
@@ -78,8 +81,16 @@ loaded. To build and install nfit_test.ko:
|
|
|
26ccd9 |
sudo make modules_install
|
|
|
26ccd9 |
```
|
|
|
26ccd9 |
|
|
|
26ccd9 |
-1. Now run `make check` in the ndctl source directory, or `ndctl test`,
|
|
|
26ccd9 |
- if ndctl was built with `--enable-test`.
|
|
|
26ccd9 |
+1. Now run `meson test -C build` in the ndctl source directory, or `ndctl test`,
|
|
|
26ccd9 |
+ if ndctl was built with `-Dtest=enabled` as a configuration option to meson.
|
|
|
26ccd9 |
+
|
|
|
26ccd9 |
+1. To run the 'destructive' set of tests that may clobber existing pmem
|
|
|
26ccd9 |
+ configurations and data, configure meson with the destructive option after the
|
|
|
26ccd9 |
+ `meson setup` step:
|
|
|
26ccd9 |
+
|
|
|
26ccd9 |
+ ```
|
|
|
26ccd9 |
+ meson configure -Dtest=enabled -Ddestructive=enabled build;
|
|
|
26ccd9 |
+ ```
|
|
|
26ccd9 |
|
|
|
26ccd9 |
Troubleshooting
|
|
|
26ccd9 |
===============
|
|
|
26ccd9 |
@@ -87,9 +98,9 @@ Troubleshooting
|
|
|
26ccd9 |
The unit tests will validate that the environment is set up correctly
|
|
|
26ccd9 |
before they try to run. If the platform is misconfigured, i.e. the unit
|
|
|
26ccd9 |
test modules are not available, or the test versions of the modules are
|
|
|
26ccd9 |
-superseded by the "in-tree/production" version of the modules `make
|
|
|
26ccd9 |
-check` will skip tests and report a message like the following in
|
|
|
26ccd9 |
-test/test-suite.log:
|
|
|
26ccd9 |
+superseded by the "in-tree/production" version of the modules `meson
|
|
|
26ccd9 |
+test` will skip tests and report a message like the following in
|
|
|
26ccd9 |
+`build/meson-logs/testlog.txt`
|
|
|
26ccd9 |
|
|
|
26ccd9 |
```
|
|
|
26ccd9 |
SKIP: libndctl
|
|
|
26ccd9 |
--
|
|
|
26ccd9 |
2.27.0
|
|
|
26ccd9 |
|