|
|
54c0d5 |
From 840fb94f9b371f6555536de2c32953c967c1122a Mon Sep 17 00:00:00 2001
|
|
|
54c0d5 |
From: Watson Sato <wsato@redhat.com>
|
|
|
54c0d5 |
Date: Tue, 21 Jan 2020 14:17:00 +0100
|
|
|
54c0d5 |
Subject: [PATCH 1/2] Don't check for path len of logs directory
|
|
|
54c0d5 |
|
|
|
54c0d5 |
The logs are not part of the tarball, nor used to build the content.
|
|
|
54c0d5 |
---
|
|
|
54c0d5 |
tests/ensure_paths_are_short.py | 4 ++++
|
|
|
54c0d5 |
1 file changed, 4 insertions(+)
|
|
|
54c0d5 |
|
|
|
54c0d5 |
diff --git a/tests/ensure_paths_are_short.py b/tests/ensure_paths_are_short.py
|
|
|
54c0d5 |
index 5d4e27cb91..18d4c662ff 100755
|
|
|
54c0d5 |
--- a/tests/ensure_paths_are_short.py
|
|
|
54c0d5 |
+++ b/tests/ensure_paths_are_short.py
|
|
|
54c0d5 |
@@ -13,6 +13,10 @@ def main():
|
|
|
54c0d5 |
ssg_root = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
|
|
|
54c0d5 |
max_path = ""
|
|
|
54c0d5 |
for dir_, _, files in os.walk(ssg_root):
|
|
|
54c0d5 |
+ # Don't check for path len of log files
|
|
|
54c0d5 |
+ # They are not shipped nor used during build
|
|
|
54c0d5 |
+ if "tests/logs/" in dir_:
|
|
|
54c0d5 |
+ continue
|
|
|
54c0d5 |
for file_ in files:
|
|
|
54c0d5 |
path = os.path.relpath(os.path.join(dir_, file_), ssg_root)
|
|
|
54c0d5 |
if len(path) > len(max_path):
|
|
|
54c0d5 |
|
|
|
54c0d5 |
From 8d29c78efc51cc2c2da0e436b3cd9a2edb5342bc Mon Sep 17 00:00:00 2001
|
|
|
54c0d5 |
From: Watson Sato <wsato@redhat.com>
|
|
|
54c0d5 |
Date: Tue, 21 Jan 2020 15:05:17 +0100
|
|
|
54c0d5 |
Subject: [PATCH 2/2] Skip only only tests/logs/ from project root
|
|
|
54c0d5 |
|
|
|
54c0d5 |
---
|
|
|
54c0d5 |
tests/ensure_paths_are_short.py | 3 ++-
|
|
|
54c0d5 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
54c0d5 |
|
|
|
54c0d5 |
diff --git a/tests/ensure_paths_are_short.py b/tests/ensure_paths_are_short.py
|
|
|
54c0d5 |
index 18d4c662ff..b9e985fea0 100755
|
|
|
54c0d5 |
--- a/tests/ensure_paths_are_short.py
|
|
|
54c0d5 |
+++ b/tests/ensure_paths_are_short.py
|
|
|
54c0d5 |
@@ -15,7 +15,8 @@ def main():
|
|
|
54c0d5 |
for dir_, _, files in os.walk(ssg_root):
|
|
|
54c0d5 |
# Don't check for path len of log files
|
|
|
54c0d5 |
# They are not shipped nor used during build
|
|
|
54c0d5 |
- if "tests/logs/" in dir_:
|
|
|
54c0d5 |
+ current_relative_path = os.path.relpath(dir_, ssg_root)
|
|
|
54c0d5 |
+ if current_relative_path.startswith("tests/logs/"):
|
|
|
54c0d5 |
continue
|
|
|
54c0d5 |
for file_ in files:
|
|
|
54c0d5 |
path = os.path.relpath(os.path.join(dir_, file_), ssg_root)
|