Skip to content

Commit

Permalink
tests: add run termux-elf-cleaner on 100 files
Browse files Browse the repository at this point in the history
Check so no errors are raised.
  • Loading branch information
Grimler91 committed Dec 15, 2023
1 parent b195a18 commit f0dfed4
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

TESTSUITE_FRAGMENTS = api-21.at api-24.at tls-alignment.at elf-cleaner.at
TESTSUITE_FRAGMENTS = api-21.at api-24.at tls-alignment.at \
elf-cleaner.at threads.at

EXTRA_DIST = $(TESTSUITE_AT) testsuite package.m4

Expand Down
2 changes: 2 additions & 0 deletions tests/elf-cleaner.at
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ m4_include([api-21.at])
m4_include([api-24.at])

m4_include([tls-alignment.at])

m4_include([threads.at])
39 changes: 39 additions & 0 deletions tests/threads.at
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Process this file with autom4te to create testsuite. -*- Autotest -*-

# Test suite for termux-elf-cleaner.
# Copyright 2022 Termux

# This file is part of termux-elf-cleaner.

# termux-elf-cleaner is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.

# termux-elf-cleaner is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program. If not, see
# <http://www.gnu.org/licenses/>.

# Ensure that termux-elf-cleaner can run on several threads

AT_BANNER([Multiple threads])

AT_SETUP([Parallel on 100 files])
AT_KEYWORDS([dynamic-section api-24 aarch64])
AT_CHECK([
for i in $(seq 1 100); do
cp ${top_srcdir}/tests/curl-7.83.1-aarch64-original curl-7.83.1-aarch64-original-$i
done
${abs_top_builddir}/termux-elf-cleaner --api-level 24 --jobs 4 --quiet curl-7.83.1-aarch64-original-*
for i in $(seq 1 100); do
cmp --silent curl-7.83.1-aarch64-original-$i ${top_srcdir}/tests/curl-7.83.1-aarch64-api24-cleaned
done
],
[0],
[])
AT_CLEANUP

0 comments on commit f0dfed4

Please sign in to comment.