Skip to content

Commit

Permalink
ltp/makefile: nuttx on github download ltp code failed fix
Browse files Browse the repository at this point in the history
Fix github download ltp code error:
Cloning into 'ltp'...
*** Please tell me who you are.
Run
  git config --global user.email "[email protected]"
  git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'root@33ba2a4a6fc5.(none)')

Signed-off-by: yanghuatao <[email protected]>
  • Loading branch information
yanghuatao committed Aug 3, 2023
1 parent ccd6aec commit a0c73c2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
6 changes: 3 additions & 3 deletions testing/ltp/0002-Use-ifdef-instead-of-if-for-__linux__.patch
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Subject: [PATCH 2/2] Use #ifdef instead of #if for __linux__
.../conformance/interfaces/sem_timedwait/3-1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/3-1.c
diff --git a/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/3-1.c b/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/3-1.c
index fb6f2e6cb..739fe86a5 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/3-1.c
--- a/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/3-1.c
+++ b/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/3-1.c
@@ -15,7 +15,7 @@
#include <sys/stat.h>
#include <sys/types.h>
Expand Down
22 changes: 14 additions & 8 deletions testing/ltp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@

include $(APPDIR)/Make.defs

LTP_UNPACK = ltp
LTP_URL = https://github.com/linux-test-project/ltp.git
LTPS_VERSION = 20230516
LTP_DOWNLOAD_URL = https://github.com/linux-test-project/ltp/archive/refs/tags/
LTP_UNPACK = ltp
LTP_URL = https://github.com/linux-test-project/ltp.git

TESTDIR = $(LTP_UNPACK)/testcases/open_posix_testsuite
TESTDIR = $(LTP_UNPACK)/testcases/open_posix_testsuite

ifneq ($(wildcard $(TESTDIR)),)
ifeq ($(CONFIG_FS_AIO),)
Expand Down Expand Up @@ -179,11 +181,15 @@ CFLAGS += -Wno-unused-variable -Wno-unused-function -Wno-unused-but-set-variable
# Should be removed if possible in the future
CFLAGS += -Wno-incompatible-pointer-types -Wno-overflow -Wno-int-to-pointer-cast

$(LTP_UNPACK):
$(Q) echo "git clone $(LTP_URL)"
$(Q) git clone $(LTP_URL)
$(Q) git -C $(LTP_UNPACK) am < 0001-Fix-static-struct-warning.patch
$(Q) git -C $(LTP_UNPACK) am < 0002-Use-ifdef-instead-of-if-for-__linux__.patch
ltp-$(LTPS_VERSION).zip:
$(call DOWNLOAD,$(LTP_DOWNLOAD_URL),$(LTPS_VERSION).zip, ltp.zip)

$(LTP_UNPACK): ltp-$(LTPS_VERSION).zip
$(Q) echo "dowload $(LTP_DOWNLOAD_URL)$(LTPS_VERSION).zip"
$(Q) unzip -o ltp.zip
$(Q) mv ltp-$(LTPS_VERSION) $(LTP_UNPACK)
$(Q) patch -p1 < 0001-pthread_rwlock_unlock-follow-linux.patch
$(Q) patch -p1 < 0002-Use-ifdef-instead-of-if-for-__linux__.patch

# Download and unpack tarball if no git repo found
ifeq ($(wildcard $(LTP_UNPACK)/.git),)
Expand Down

0 comments on commit a0c73c2

Please sign in to comment.