anitazha / rpms / ndctl

Forked from rpms/ndctl a year ago
Clone

Blame SOURCES/0086-ndctl-update-README.md-for-meson-build.patch

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