ltp/makefile: nuttx on github download ltp code failed fix

Fix github download ltp code error:
Cloning into 'ltp'...
*** Please tell me who you are.
Run
  git config --global user.email "you@example.com"
  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 <yanghuatao@xiaomi.com>
This commit is contained in:
yanghuatao 2023-08-03 15:23:35 +08:00 committed by Xiang Xiao
parent e109319a2e
commit 1309990d6c
2 changed files with 17 additions and 11 deletions

View File

@ -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>

View File

@ -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),)
@ -274,11 +276,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),)