[00:00.000 --> 00:15.280] Okay, hello, I'm Gabor Keremann from Allotopia at BMW and I would like to talk about how [00:15.280 --> 00:20.360] we do crash testing in the backyard. [00:20.360 --> 00:23.800] So let's start. [00:23.800 --> 00:26.280] What is even this crash testing? [00:26.280 --> 00:34.760] Crash testing is a QA subproject of TDF and it's run on the master branch around every [00:34.760 --> 00:36.760] second week. [00:36.760 --> 00:40.080] So what is this testing? [00:40.080 --> 00:48.920] It's testing continuously opening files, saving them in different formats and reopening of [00:48.920 --> 00:51.480] those saved files. [00:51.480 --> 00:59.400] And make sure that crashes during this workflow don't happen because that's kind of bad for [00:59.400 --> 01:03.040] user perspective. [01:03.040 --> 01:10.360] And usually this process sends a resulting mail to the developer's list and interested [01:10.360 --> 01:21.080] parties like mostly Kaolan fix those crashes and that's good on master branch. [01:21.080 --> 01:30.320] But what if the long-term support branches which we maintain for customers introduce [01:30.320 --> 01:34.760] such errors that would be kind of bad for customers. [01:34.760 --> 01:40.720] So we wanted to avoid that in the longer run. [01:40.720 --> 01:49.360] Okay, so what are the prerequisites for this work? [01:49.360 --> 01:55.480] You need first some hardware, a beefy system with many CPU threats because there is a lot [01:55.480 --> 02:08.000] of files to test and of course bunch of files, tens of thousands and this can be downloaded [02:08.000 --> 02:11.920] using scripts in the core repository. [02:11.920 --> 02:16.640] Then you need the crash testing scripts themselves. [02:16.640 --> 02:25.120] You need to download them on the beefy system, configure them to build LibreOffice, run [02:25.120 --> 02:33.560] them on the set of files you have just downloaded and also interpret the results. [02:33.560 --> 02:39.240] So this is how the beefy system looks in real life. [02:39.240 --> 02:44.840] It's nothing entirely in the backyard but on the couch, let's say. [02:44.840 --> 02:57.960] It also needs some 40 CPUs or so and a lot of disk space as well. [02:57.960 --> 03:05.760] Next, second step is downloading files. [03:05.760 --> 03:13.880] First script is called like this in the core repository and this makes, it downloads user [03:13.880 --> 03:21.240] made file attachments from public bug trackers such as TDF and Apache OpenOffice bugzilla, [03:21.240 --> 03:29.760] Linux distribution bug trackers and office software bug trackers such as K-Office, Gnomeric [03:29.760 --> 03:38.080] and Abii Word and it has some lovely or less lovely un-user friendly properties such as [03:38.080 --> 03:47.080] you need to install some extra Python modules and set an environment variable to Taylor [03:47.080 --> 03:55.200] for your hardware so that the download happens quite quickly and you need to run it from [03:55.200 --> 04:03.840] the download target directory but that's all that gave it at this script. [04:03.840 --> 04:09.920] Next, second script is a website scraper called like this. [04:09.920 --> 04:12.480] It needs also some Python modules. [04:12.480 --> 04:20.680] You can add the target directory as parameter and some Microsoft Office themed forums will [04:20.680 --> 04:27.440] need registration before this can work on them and login data needs to be stored in [04:27.440 --> 04:30.600] any format file. [04:30.600 --> 04:35.720] Next, getting the crash testing scripts themselves. [04:35.720 --> 04:43.480] It's not in the core repository but this other contrib dev tools repository and in the test [04:43.480 --> 04:46.560] bugzilla files directory. [04:46.560 --> 04:51.560] So how to make sense of that. [04:51.560 --> 04:58.360] Configuring the environment is also very important and this is the most difficult part of this [04:58.360 --> 05:06.840] talk so before you start running the scripts you need to configure the environment with [05:06.840 --> 05:10.520] this config file. [05:10.520 --> 05:18.520] It needs to be placed on that path. [05:18.520 --> 05:27.800] There are some defaults in the dev tools repository but you should overwrite those. [05:27.800 --> 05:41.280] The most important settings are this compiler, sorry, the compiler version GCC or clang works [05:41.280 --> 05:50.320] the same in this regard but you just need to take care that the old version of Libre [05:50.320 --> 05:57.840] Office you want to compile actually compiles with your compiler. [05:57.840 --> 06:06.920] You need to set the parallelism, how many CPU threads you have, it's with workers environment [06:06.920 --> 06:16.320] variable and the most important thing is the path for this script. [06:16.320 --> 06:26.040] So we need the location of the files to test which were downloaded by the two slides ago [06:26.040 --> 06:37.640] and after that you need to hard code the dev tools repository path with this TT path and [06:37.640 --> 06:45.520] next is source there for the Libre Office core repository clone which you also need [06:45.520 --> 06:57.280] to compile and you need a build directory where the output of the computation will go. [06:57.280 --> 07:06.200] So in the build directory you need also place the autogen input file, it's also in the [07:06.200 --> 07:11.840] dev tools repository. [07:11.840 --> 07:19.440] And of course you don't want to send the casual email and upload the results to TDF site [07:19.440 --> 07:27.240] because it's internal for the company so you need to set these two other tools variables. [07:27.240 --> 07:39.960] Okay next it's easy, there is a crash test data variable for the downloaded files, you [07:39.960 --> 07:49.600] need to copy your files there and execute the commands shell script which will do all [07:49.600 --> 07:58.800] the heavy lifting and basically that's all. [07:58.800 --> 08:06.000] These arts will be in the crash test data directory on the logs and the mail txt file [08:06.000 --> 08:12.360] will be the summary of the run. [08:12.360 --> 08:20.960] Next step is finding what went wrong and fix the actual crashes which is just casual back [08:20.960 --> 08:25.280] porting bug fixing. [08:25.280 --> 08:38.840] So what are gains of upstream from this work, there are some, I made these scripts a lot [08:38.840 --> 08:46.120] more configurable so you can set them up more easily for other companies. [08:46.120 --> 09:00.720] For that it was only able to run on the TDF server and it was kind of a pain to transplant [09:00.720 --> 09:01.880] it to another machine. [09:01.880 --> 09:08.840] Also a little bit of performance gain, there was a bottleneck and the upstream also can [09:08.840 --> 09:13.760] run this work more quickly. [09:13.760 --> 09:17.600] And that's all, thanks for the attention.