anitazha / rpms / ndctl

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