diff mbox

[v2,2/5] support/testing: add core tests

Message ID 1488726201-6507-3-git-send-email-thomas.petazzoni@free-electrons.com
State Superseded
Headers show

Commit Message

Thomas Petazzoni March 5, 2017, 3:03 p.m. UTC
This commit adds a few Buildroot "core" tests, testing functionalities
such as:

 - post-build and post-image scripts
 - root filesystem overlays
 - timezone support

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 support/testing/tests/core/__init__.py             |   0
 support/testing/tests/core/post-build.sh           |  10 ++++
 support/testing/tests/core/post-image.sh           |  10 ++++
 .../testing/tests/core/rootfs-overlay1/test-file1  | Bin 0 -> 4096 bytes
 .../tests/core/rootfs-overlay2/etc/test-file2      | Bin 0 -> 8192 bytes
 support/testing/tests/core/test_post_scripts.py    |  35 +++++++++++
 support/testing/tests/core/test_rootfs_overlay.py  |  27 +++++++++
 support/testing/tests/core/test_timezone.py        |  66 +++++++++++++++++++++
 8 files changed, 148 insertions(+)
 create mode 100644 support/testing/tests/core/__init__.py
 create mode 100755 support/testing/tests/core/post-build.sh
 create mode 100755 support/testing/tests/core/post-image.sh
 create mode 100644 support/testing/tests/core/rootfs-overlay1/test-file1
 create mode 100644 support/testing/tests/core/rootfs-overlay2/etc/test-file2
 create mode 100644 support/testing/tests/core/test_post_scripts.py
 create mode 100644 support/testing/tests/core/test_rootfs_overlay.py
 create mode 100644 support/testing/tests/core/test_timezone.py

Comments

Yann E. MORIN March 5, 2017, 4 p.m. UTC | #1
Thomas, All,

On 2017-03-05 16:03 +0100, Thomas Petazzoni spake thusly:
> This commit adds a few Buildroot "core" tests, testing functionalities
> such as:
> 
>  - post-build and post-image scripts
>  - root filesystem overlays
>  - timezone support
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

I won't be commenting on the Python code, because I'm no Python
expert... ;-)

Yet, a few questions below...

> ---
>  support/testing/tests/core/__init__.py             |   0
>  support/testing/tests/core/post-build.sh           |  10 ++++
>  support/testing/tests/core/post-image.sh           |  10 ++++
>  .../testing/tests/core/rootfs-overlay1/test-file1  | Bin 0 -> 4096 bytes
>  .../tests/core/rootfs-overlay2/etc/test-file2      | Bin 0 -> 8192 bytes

What are those two binary blobs for?
Why are they binary blobs?
Can't they be generated locally?

>  support/testing/tests/core/test_post_scripts.py    |  35 +++++++++++
>  support/testing/tests/core/test_rootfs_overlay.py  |  27 +++++++++
>  support/testing/tests/core/test_timezone.py        |  66 +++++++++++++++++++++
>  8 files changed, 148 insertions(+)
>  create mode 100644 support/testing/tests/core/__init__.py
>  create mode 100755 support/testing/tests/core/post-build.sh
>  create mode 100755 support/testing/tests/core/post-image.sh
>  create mode 100644 support/testing/tests/core/rootfs-overlay1/test-file1
>  create mode 100644 support/testing/tests/core/rootfs-overlay2/etc/test-file2
>  create mode 100644 support/testing/tests/core/test_post_scripts.py
>  create mode 100644 support/testing/tests/core/test_rootfs_overlay.py
>  create mode 100644 support/testing/tests/core/test_timezone.py
> 
> diff --git a/support/testing/tests/core/__init__.py b/support/testing/tests/core/__init__.py
> new file mode 100644
> index 0000000..e69de29
> diff --git a/support/testing/tests/core/post-build.sh b/support/testing/tests/core/post-build.sh
> new file mode 100755
> index 0000000..fbea726
> --- /dev/null
> +++ b/support/testing/tests/core/post-build.sh
> @@ -0,0 +1,10 @@
> +#!/bin/sh
> +echo $1 > ${BUILD_DIR}/post-build.log
> +echo $2 >> ${BUILD_DIR}/post-build.log
> +echo $3 >> ${BUILD_DIR}/post-build.log
> +echo ${TARGET_DIR}  >> ${BUILD_DIR}/post-build.log
> +echo ${BUILD_DIR}   >> ${BUILD_DIR}/post-build.log
> +echo ${HOST_DIR}    >> ${BUILD_DIR}/post-build.log
> +echo ${STAGING_DIR} >> ${BUILD_DIR}/post-build.log
> +echo ${BINARIES_DIR}  >> ${BUILD_DIR}/post-build.log
> +echo ${BR2_CONFIG}  >> ${BUILD_DIR}/post-build.log

This is ugly, and I guess it will be hard to maintain consistency
between this list and the checks done in the code.

This does not work well if there are any problematice character in
there, so I'd at least quote the variables.

But I would even go further and print key-value pairs to the file:

    #!/bin/sh
    printf "what='%s'\n" "${1}"
    printf "arg2='%s'\n" "${2}"
    printf "arg3='%s'\n" "${2}"
    printf "TARGET_DIR='%s'\n" "${TARGET_DIR}"
    printf "BUILD_DIR='%s'\n" "${BUILD_DIR}"
    [...]

And then use a parser [*] to read that file and store the values in an
associative array (aka dictionnary) in the python code, then you can do
things like:

    self.assert(post_log["what"], os.path.join(self.builddir, what))
    self.assert(post_log["TARGET_DIR"], os.path.join(self.builddir, "target"))

and so on... Which is much more readable IMHO...

[*] I don't know which parser, but probably one that can read key-value
pairs from a file... ;-)  Python experts may help you here... ;-]

> diff --git a/support/testing/tests/core/post-image.sh b/support/testing/tests/core/post-image.sh
> new file mode 100755
> index 0000000..5856c0f
> --- /dev/null
> +++ b/support/testing/tests/core/post-image.sh
> @@ -0,0 +1,10 @@
> +#!/bin/sh
> +echo $1 > ${BUILD_DIR}/post-image.log
> +echo $2 >> ${BUILD_DIR}/post-image.log
> +echo $3 >> ${BUILD_DIR}/post-image.log
> +echo ${TARGET_DIR}  >> ${BUILD_DIR}/post-image.log
> +echo ${BUILD_DIR}   >> ${BUILD_DIR}/post-image.log
> +echo ${HOST_DIR}    >> ${BUILD_DIR}/post-image.log
> +echo ${STAGING_DIR} >> ${BUILD_DIR}/post-image.log
> +echo ${BINARIES_DIR}  >> ${BUILD_DIR}/post-image.log
> +echo ${BR2_CONFIG}  >> ${BUILD_DIR}/post-image.log

Ditto.

> diff --git a/support/testing/tests/core/test_post_scripts.py b/support/testing/tests/core/test_post_scripts.py
> new file mode 100644
> index 0000000..7b4a829
> --- /dev/null
> +++ b/support/testing/tests/core/test_post_scripts.py
> @@ -0,0 +1,35 @@
> +import os
> +
> +import infra.basetest
> +
> +class TestPostScripts(infra.basetest.BRTest):
> +    config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
> +"""
> +BR2_INIT_NONE=y
> +BR2_SYSTEM_BIN_SH_NONE=y
> +# BR2_PACKAGE_BUSYBOX is not set
> +BR2_ROOTFS_POST_BUILD_SCRIPT="{}"
> +BR2_ROOTFS_POST_IMAGE_SCRIPT="{}"
> +BR2_ROOTFS_POST_SCRIPT_ARGS="foobar baz"
> +""".format(infra.filepath("tests/core/post-build.sh"),
> +           infra.filepath("tests/core/post-image.sh"))
> +
> +    def check_post_log_file(self, path, what):
> +        with open(path, "r") as f:
> +            lines = f.read().splitlines()
> +        self.assertEqual(lines[0], os.path.join(self.builddir, what))
> +        self.assertEqual(lines[1], "foobar")
> +        self.assertEqual(lines[2], "baz")
> +        self.assertEqual(lines[3], os.path.join(self.builddir, "target"))
> +        self.assertEqual(lines[4], os.path.join(self.builddir, "build"))
> +        self.assertEqual(lines[5], os.path.join(self.builddir, "host"))
> +        staging = os.readlink(os.path.join(self.builddir, "staging"))
> +        self.assertEqual(lines[6], staging)
> +        self.assertEqual(lines[7], os.path.join(self.builddir, "images"))
> +        self.assertEqual(lines[8], os.path.join(self.builddir, ".config"))

See above.

Regards,
Yann E. MORIN.
Thomas Petazzoni March 5, 2017, 5:54 p.m. UTC | #2
Hello,

On Sun, 5 Mar 2017 17:00:01 +0100, Yann E. MORIN wrote:

> >  support/testing/tests/core/__init__.py             |   0
> >  support/testing/tests/core/post-build.sh           |  10 ++++
> >  support/testing/tests/core/post-image.sh           |  10 ++++
> >  .../testing/tests/core/rootfs-overlay1/test-file1  | Bin 0 -> 4096 bytes
> >  .../tests/core/rootfs-overlay2/etc/test-file2      | Bin 0 -> 8192 bytes  
> 
> What are those two binary blobs for?
> Why are they binary blobs?
> Can't they be generated locally?

They are just here to avoid some files containing random stuff, we
don't care what they contain. So indeed, they could be generated
instead of stored in the repository.

However, right now, the testing infrastructure doesn't allow a test to
run some custom operations *before* the build is started. But it's
clearly something that will be needed for a significant number of
tests, so we definitely want to add something like that.

> > +#!/bin/sh
> > +echo $1 > ${BUILD_DIR}/post-build.log
> > +echo $2 >> ${BUILD_DIR}/post-build.log
> > +echo $3 >> ${BUILD_DIR}/post-build.log
> > +echo ${TARGET_DIR}  >> ${BUILD_DIR}/post-build.log
> > +echo ${BUILD_DIR}   >> ${BUILD_DIR}/post-build.log
> > +echo ${HOST_DIR}    >> ${BUILD_DIR}/post-build.log
> > +echo ${STAGING_DIR} >> ${BUILD_DIR}/post-build.log
> > +echo ${BINARIES_DIR}  >> ${BUILD_DIR}/post-build.log
> > +echo ${BR2_CONFIG}  >> ${BUILD_DIR}/post-build.log  
> 
> This is ugly, and I guess it will be hard to maintain consistency
> between this list and the checks done in the code.

I wouldn't call it "ugly", but it indeed could be better.

> This does not work well if there are any problematice character in
> there, so I'd at least quote the variables.
> 
> But I would even go further and print key-value pairs to the file:
> 
>     #!/bin/sh
>     printf "what='%s'\n" "${1}"
>     printf "arg2='%s'\n" "${2}"
>     printf "arg3='%s'\n" "${2}"
>     printf "TARGET_DIR='%s'\n" "${TARGET_DIR}"
>     printf "BUILD_DIR='%s'\n" "${BUILD_DIR}"
>     [...]
> 
> And then use a parser [*] to read that file and store the values in an
> associative array (aka dictionnary) in the python code, then you can do
> things like:
> 
>     self.assert(post_log["what"], os.path.join(self.builddir, what))
>     self.assert(post_log["TARGET_DIR"], os.path.join(self.builddir, "target"))
> 
> and so on... Which is much more readable IMHO...
> 
> [*] I don't know which parser, but probably one that can read key-value
> pairs from a file... ;-)  Python experts may help you here... ;-]

Not sure which parser to use here. Perhaps some sort of CSV file is
easier to parse in Python.

Thomas
diff mbox

Patch

diff --git a/support/testing/tests/core/__init__.py b/support/testing/tests/core/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/support/testing/tests/core/post-build.sh b/support/testing/tests/core/post-build.sh
new file mode 100755
index 0000000..fbea726
--- /dev/null
+++ b/support/testing/tests/core/post-build.sh
@@ -0,0 +1,10 @@ 
+#!/bin/sh
+echo $1 > ${BUILD_DIR}/post-build.log
+echo $2 >> ${BUILD_DIR}/post-build.log
+echo $3 >> ${BUILD_DIR}/post-build.log
+echo ${TARGET_DIR}  >> ${BUILD_DIR}/post-build.log
+echo ${BUILD_DIR}   >> ${BUILD_DIR}/post-build.log
+echo ${HOST_DIR}    >> ${BUILD_DIR}/post-build.log
+echo ${STAGING_DIR} >> ${BUILD_DIR}/post-build.log
+echo ${BINARIES_DIR}  >> ${BUILD_DIR}/post-build.log
+echo ${BR2_CONFIG}  >> ${BUILD_DIR}/post-build.log
diff --git a/support/testing/tests/core/post-image.sh b/support/testing/tests/core/post-image.sh
new file mode 100755
index 0000000..5856c0f
--- /dev/null
+++ b/support/testing/tests/core/post-image.sh
@@ -0,0 +1,10 @@ 
+#!/bin/sh
+echo $1 > ${BUILD_DIR}/post-image.log
+echo $2 >> ${BUILD_DIR}/post-image.log
+echo $3 >> ${BUILD_DIR}/post-image.log
+echo ${TARGET_DIR}  >> ${BUILD_DIR}/post-image.log
+echo ${BUILD_DIR}   >> ${BUILD_DIR}/post-image.log
+echo ${HOST_DIR}    >> ${BUILD_DIR}/post-image.log
+echo ${STAGING_DIR} >> ${BUILD_DIR}/post-image.log
+echo ${BINARIES_DIR}  >> ${BUILD_DIR}/post-image.log
+echo ${BR2_CONFIG}  >> ${BUILD_DIR}/post-image.log
diff --git a/support/testing/tests/core/rootfs-overlay1/test-file1 b/support/testing/tests/core/rootfs-overlay1/test-file1
new file mode 100644
index 0000000000000000000000000000000000000000..19f4220f2c6a1bdbd927637d19867b7d04ff5752
GIT binary patch
literal 4096
zcmV+b5dZJLh5%0erUIG?ui=pzQ*dtx%8BVBkmb`@#KxT3$@S==e)~Kz@8$8?C9JM<
zgZ}g(q`BIWGUM)Mw!eGZ|BkfMYV2E+f-x$|bq~~pEXwsYpqRPO%P@v;(j<=1ez;5#
zZ~WjJvTLT0wZO3%`?A#ZG(ddm$u!2O>52n83+sWg#{-UbkKNBEmF)k*txQiMz&WpU
z*tHG}E!J3qC3rOv$sdbB-vAIszFfqhx6^8XeGad0G}07gs~yQO{gn~5j*NRU6X7hv
zWEU)MCx^1FW6Q#CKPc$`uxWlKi?FYlqU_T*By54Qv5p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s$Hl9C0+upPJ6b5^9=yUSriHDKb8_`&=<8~|zYALWy
zh_#lOC$RGr_JO%+9tpLfshpEamHipfEC#P`oA&NSGpOA?SZ<3-BdrHI&`slrY|E=V
z(E-xMTMOp2l0~ddb9^L~c#H})Rg;Bq>MKrjsM4JOAHcM3oibOOdho@EpTws|JnO+X
zNPmsIg?zx!wlm-Qs9_g*++m;laFYOP{{RGseZTjFz4HA6`diVlhd^W|raX@$t}@<#
zQZe)L>QZ(dW$(e)%1Q{CCD{_iBv)h#A;T$Z>}IUnNlMn_Qd3c_J~8yE=Pd_lzUu(F
ze@%|1GwXq96U$-8AINpXaC*hcxU%Y^G8`;C`&Tmvhd30p^V&SbMkwS9b&(W2b0rlS
zxckLp9YB<3{nCDT1gQdLky?uCY;Ch?N$Ee!avymbEY|M^R(^cWWe@`DZzd)=JLH5~
z8+RE*(RF5R+s?Ywjyc&74$bS5bIy&b%~@t}Hw62c^Ft}_{FGci8k#-+|93%>v=zI0
zPAIGax8Vxq+4us8oc6gb4r_MByH3!@sqkDZxR4XZiRmUHZ*fxTCb#^)(h8_?;(9-A
zuee1D;K)!Q-8h(}73$Wck!nr1x&)V`|EHlDcg{}|hH*4qW6B~Fj)|sjI%*eo$N{(|
zAsmU`%E(q>%@ggi$)x${jLmsBLHz1Pm;|Q~FB=Fsa5X))yuX!rIH(5{jIewiNY?iz
zAR+tqc6hpAUMrVa*O#qOo6Hx=Z6jtQ$bL(y;Y=u~h2pEL1PA42BOy!*DMwNO{5*aH
yd72ypwr~zUn!(0u`mVHL_09fxtD!&;2{0oQv?aNzEh2fT7Xn_FK9_17BKHGZI1GRQ

literal 0
HcmV?d00001

diff --git a/support/testing/tests/core/rootfs-overlay2/etc/test-file2 b/support/testing/tests/core/rootfs-overlay2/etc/test-file2
new file mode 100644
index 0000000000000000000000000000000000000000..c9488dff0f6435f9dee3a8ac10daa990d459c718
GIT binary patch
literal 8192
zcmV+bAphT`=ZRSOtwRO%f-ZHlb7n2&a0Zq$4CT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!zdiu2tq7vr#kMhrkbV5sAvZRTYOp!c=-7
za4pgoql&GElYzE&CGw;Q3l&y}qx&ljRN8PaJ@&IBOiJSr!R3@k(sMz5eEp|J5Sp!4
z8bYOol|CIWXG`A|l$=%I{4h;Ut1{GT$BL+llrFnY3X(#A<eaVuBnp#_@HblWgn?H=
mc#N<=BgLV1-)U!8j}zr`9=5D9AA!_osZSLWra6pxTf7y>1=ySb

literal 0
HcmV?d00001

diff --git a/support/testing/tests/core/test_post_scripts.py b/support/testing/tests/core/test_post_scripts.py
new file mode 100644
index 0000000..7b4a829
--- /dev/null
+++ b/support/testing/tests/core/test_post_scripts.py
@@ -0,0 +1,35 @@ 
+import os
+
+import infra.basetest
+
+class TestPostScripts(infra.basetest.BRTest):
+    config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+"""
+BR2_INIT_NONE=y
+BR2_SYSTEM_BIN_SH_NONE=y
+# BR2_PACKAGE_BUSYBOX is not set
+BR2_ROOTFS_POST_BUILD_SCRIPT="{}"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="{}"
+BR2_ROOTFS_POST_SCRIPT_ARGS="foobar baz"
+""".format(infra.filepath("tests/core/post-build.sh"),
+           infra.filepath("tests/core/post-image.sh"))
+
+    def check_post_log_file(self, path, what):
+        with open(path, "r") as f:
+            lines = f.read().splitlines()
+        self.assertEqual(lines[0], os.path.join(self.builddir, what))
+        self.assertEqual(lines[1], "foobar")
+        self.assertEqual(lines[2], "baz")
+        self.assertEqual(lines[3], os.path.join(self.builddir, "target"))
+        self.assertEqual(lines[4], os.path.join(self.builddir, "build"))
+        self.assertEqual(lines[5], os.path.join(self.builddir, "host"))
+        staging = os.readlink(os.path.join(self.builddir, "staging"))
+        self.assertEqual(lines[6], staging)
+        self.assertEqual(lines[7], os.path.join(self.builddir, "images"))
+        self.assertEqual(lines[8], os.path.join(self.builddir, ".config"))
+
+    def test_run(self):
+        f = os.path.join(self.builddir, "build", "post-build.log")
+        self.check_post_log_file(f, "target")
+        f = os.path.join(self.builddir, "build", "post-image.log")
+        self.check_post_log_file(f, "images")
diff --git a/support/testing/tests/core/test_rootfs_overlay.py b/support/testing/tests/core/test_rootfs_overlay.py
new file mode 100644
index 0000000..42d890b
--- /dev/null
+++ b/support/testing/tests/core/test_rootfs_overlay.py
@@ -0,0 +1,27 @@ 
+import os
+import subprocess
+
+import infra.basetest
+
+def compare_file(file1, file2):
+    return subprocess.call(["cmp", file1, file2])
+
+class TestRootfsOverlay(infra.basetest.BRTest):
+
+    rootfs_overlay_path = infra.filepath("tests/core/rootfs-overlay")
+    rootfs_overlay = "BR2_ROOTFS_OVERLAY=\"{0}1 {0}2\"".format(rootfs_overlay_path)
+
+    config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+            infra.basetest.MINIMAL_CONFIG + \
+            rootfs_overlay
+
+    def test_run(self):
+        target_file = os.path.join(self.builddir, "target", "test-file1")
+        overlay_file = "{}1/test-file1".format(self.rootfs_overlay_path)
+        ret = compare_file(overlay_file, target_file)
+        self.assertEqual(ret, 0)
+
+        target_file = os.path.join(self.builddir, "target", "etc", "test-file2")
+        overlay_file = "{}2/etc/test-file2".format(self.rootfs_overlay_path)
+        ret = compare_file(overlay_file, target_file)
+        self.assertEqual(ret, 0)
diff --git a/support/testing/tests/core/test_timezone.py b/support/testing/tests/core/test_timezone.py
new file mode 100644
index 0000000..9776b4b
--- /dev/null
+++ b/support/testing/tests/core/test_timezone.py
@@ -0,0 +1,66 @@ 
+import os
+
+import infra.basetest
+
+def boot_armv5_cpio(emulator, builddir):
+        img = os.path.join(builddir, "images", "rootfs.cpio")
+        emulator.boot(arch="armv5", kernel="builtin",
+                      options=["-initrd", img])
+        emulator.login()
+
+class TestNoTimezone(infra.basetest.BRTest):
+    config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+             """
+# BR2_TARGET_TZ_INFO is not set
+BR2_TARGET_ROOTFS_CPIO=y
+# BR2_TARGET_ROOTFS_TAR is not set
+"""
+
+    def test_run(self):
+        boot_armv5_cpio(self.emulator, self.builddir)
+        tz, _ = self.emulator.run("TZ=UTC date +%Z")
+        self.assertEqual(tz[0].strip(), "UTC")
+        tz, _ = self.emulator.run("TZ=America/Los_Angeles date +%Z")
+        self.assertEqual(tz[0].strip(), "UTC")
+
+class TestGlibcAllTimezone(infra.basetest.BRTest):
+    config = """
+BR2_arm=y
+BR2_TOOLCHAIN_EXTERNAL=y
+BR2_TARGET_TZ_INFO=y
+BR2_TARGET_ROOTFS_CPIO=y
+# BR2_TARGET_ROOTFS_TAR is not set
+"""
+
+    def test_run(self):
+        boot_armv5_cpio(self.emulator, self.builddir)
+        tz, _ = self.emulator.run("date +%Z")
+        self.assertEqual(tz[0].strip(), "UTC")
+        tz, _ = self.emulator.run("TZ=UTC date +%Z")
+        self.assertEqual(tz[0].strip(), "UTC")
+        tz, _ = self.emulator.run("TZ=America/Los_Angeles date +%Z")
+        self.assertEqual(tz[0].strip(), "PST")
+        tz, _ = self.emulator.run("TZ=Europe/Paris date +%Z")
+        self.assertEqual(tz[0].strip(), "CET")
+
+class TestGlibcNonDefaultLimitedTimezone(infra.basetest.BRTest):
+    config = """
+BR2_arm=y
+BR2_TOOLCHAIN_EXTERNAL=y
+BR2_TARGET_TZ_INFO=y
+BR2_TARGET_TZ_ZONELIST="northamerica"
+BR2_TARGET_LOCALTIME="America/New_York"
+BR2_TARGET_ROOTFS_CPIO=y
+# BR2_TARGET_ROOTFS_TAR is not set
+"""
+
+    def test_run(self):
+        boot_armv5_cpio(self.emulator, self.builddir)
+        tz, _ = self.emulator.run("date +%Z")
+        self.assertEqual(tz[0].strip(), "EST")
+        tz, _ = self.emulator.run("TZ=UTC date +%Z")
+        self.assertEqual(tz[0].strip(), "UTC")
+        tz, _ = self.emulator.run("TZ=America/Los_Angeles date +%Z")
+        self.assertEqual(tz[0].strip(), "PST")
+        tz, _ = self.emulator.run("TZ=Europe/Paris date +%Z")
+        self.assertEqual(tz[0].strip(), "Europe")