diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2021-03-01 13:17:59 +0100 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2021-03-04 00:06:21 +0100 |
commit | 8b763fe3e6e184a84c298ca62073023f7273e250 (patch) | |
tree | 3889bbc9752e401107ecbe7aeb738b9918025de0 /scripts | |
parent | 65d8fa618c20b77eca6efbd5f3badf1591ee10ae (diff) | |
download | hardware_replicant_libsamsung-ipc-8b763fe3e6e184a84c298ca62073023f7273e250.tar.gz hardware_replicant_libsamsung-ipc-8b763fe3e6e184a84c298ca62073023f7273e250.tar.bz2 hardware_replicant_libsamsung-ipc-8b763fe3e6e184a84c298ca62073023f7273e250.zip |
Partitions: android: add tests for open_android_modem_partition
Libraries typically have a public API and some internal
implementation of that API. In libsamsung-ipc, the public
API is defined in the include/ directory from the top directory.
When compiling and installing libsamsung-ipc, that include/
directory is installed as well.
Anything that is not defined in include/ is not part of that
public API.
However here we need to precisely test functions that are not
part of that public API: The open_android_modem_partition
function being tested here is only used by the herolte device,
and that device doesn't have a battery that is easily replaceable,
so most Replicant contributors will not want to get that device.
As currently all the non static symbols of libsamsung-ipc are
exported and that open_android_modem_partition isn't static,
we can simply link to libsamsung-ipc for now and use its
internal headers to access the functions to test.
If at some point, libsamsung-ipc only exports the symbols defined
in include/ we would need to find other ways to run such tests,
for instance by using test frameworks that take care of that or by
compiling libsamsung-ipc source code into the test programs.
Some of the code of the libsamsung-ipc-test utility was adapted
from code from the nv_data-md5 utility (which is currently in
tools/).
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/guix.scm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/guix.scm b/scripts/guix.scm index c6e033a..a917a82 100644 --- a/scripts/guix.scm +++ b/scripts/guix.scm @@ -113,7 +113,7 @@ (modify-phases %standard-phases (add-before 'build 'patch-python (lambda _ - (substitute* (find-files "tools" ".*\\.py$") + (substitute* (find-files "." ".*\\.py$") (("/usr/bin/env python") (which "python3"))) #t))))) (synopsis "libsamsung-ipc is a free software implementation of the Samsung IPC modem protocol") @@ -154,7 +154,7 @@ found in many Samsung smartphones and tablets.") (modify-phases %standard-phases (add-before 'build 'patch-python (lambda _ - (substitute* (find-files "tools" ".*\\.py$") + (substitute* (find-files "." ".*\\.py$") (("/usr/bin/env python") (which "python3"))) #t))) #:make-flags (list ,%common-strict-cflags))))) @@ -177,7 +177,7 @@ found in many Samsung smartphones and tablets.") (modify-phases %standard-phases (add-before 'build 'patch-python (lambda _ - (substitute* (find-files "tools" ".*\\.py$") + (substitute* (find-files "." ".*\\.py$") (("/usr/bin/env python") (which "python3"))) #t))) #:make-flags (list ,%common-strict-cflags ,%clang-strict-cflags))))) |