tsimonq2 | monsterjamp: I saw, I'll check it out later or tomorrow :) | 00:32 |
---|---|---|
monsterjamp | Alright, although I just realized I need to do more than just make the plugin. Apparently I need to make unit tests and integration tests. | 00:34 |
monsterjamp | So earlier today I was trying to make a snap which led me to making a web installer script for a dependency and then I ended up making a plugin for snapcraft to be able to run the web installer script. | 00:43 |
qengho | Nice. | 00:45 |
monsterjamp | So by trying to contribute to one project, I ended up contributing to 3 (kinda). | 00:47 |
qengho | monsterjamp: simple. I like it. | 00:47 |
monsterjamp | :D | 00:47 |
qengho | monsterjamp: So, if I don't include an build_arguments string, it doesn't run the script in the build stage? | 00:49 |
monsterjamp | Yeah however the string can be empty | 00:50 |
monsterjamp | build-arguments: [] | 00:50 |
monsterjamp | I'm not sure if I should change the way the plugin works. | 00:51 |
qengho | monsterjamp: How about making thea args an array instead of a string? My arg has a space inside it. Getting that escaped through YAML is hard. | 00:51 |
monsterjamp | It is an array? | 00:52 |
qengho | Oh, it is!Cool. | 00:52 |
qengho | Looks like the default is already [], so defining it as [] should change nothing. I think an empty list will be be false-y. | 00:53 |
monsterjamp | I see, I guess I have to change some things then. | 00:54 |
monsterjamp | I completely missed the "default []" line. | 00:57 |
monsterjamp | qengho I updated the plugin: https://gist.github.com/monsterjamp/570fbfe8bbdf959d94486f293956fdbe | 01:17 |
monsterjamp | Now there's another optional property called 'stages' which tells snapcraft which stages the script should be called in. | 01:18 |
tsimonq2 | monsterjamp: I can help with unit and integration tests in a bit | 01:27 |
monsterjamp | tsimonq2 Thanks, that would be really helpful. I haven't ever really done anything to do with unit/integration test. | 01:28 |
monsterjamp | Although it looks rather straight forward. | 01:28 |
tsimonq2 | they can be a pita so I'll help after I'm done eating. :) | 01:29 |
tsimonq2 | monsterjamp: so let's start with this | 01:36 |
monsterjamp | :D | 01:36 |
tsimonq2 | do you know waht unit and integration tests are? | 01:36 |
tsimonq2 | *what | 01:36 |
monsterjamp | Well I'm guessing they're used to check if a feature works? | 01:37 |
tsimonq2 | monsterjamp: yes that, but it also makes sure that the feature doesn't regress in the future | 01:38 |
monsterjamp | I see, but what are unit tests? | 01:38 |
tsimonq2 | the unit tests are more of a Pythonic way to test things, if that makes sense | 01:39 |
tsimonq2 | monsterjamp: so in Snapcraft we actually have three types of tests | 01:39 |
tsimonq2 | static - syntax/typo check | 01:39 |
tsimonq2 | unit - Pythonic testing of the code | 01:40 |
tsimonq2 | integration - more of a real example testing | 01:40 |
tsimonq2 | monsterjamp: so you should always make sure static passes first, because that might point out the obvious | 01:40 |
monsterjamp | I'm not sure what Pythonic means :P | 01:40 |
tsimonq2 | call the functions in Python instead of the usual, user-facing way | 01:41 |
tsimonq2 | monsterjamp: so let's look at your static tests here: https://travis-ci.org/snapcore/snapcraft/jobs/145144193 | 01:41 |
monsterjamp | I fixed my script to pass the static tests here: https://gist.github.com/monsterjamp/570fbfe8bbdf959d94486f293956fdbe | 01:42 |
tsimonq2 | then git add, git commit, git push | 01:42 |
tsimonq2 | :) | 01:42 |
monsterjamp | kk | 01:43 |
monsterjamp | I pushed, I guess it'll take a while before travis-ci can check it again. | 01:45 |
tsimonq2 | a little bit :) | 01:45 |
tsimonq2 | I can tell you what's wrong with your unit tests, though | 01:46 |
tsimonq2 | it prints the plugin list in several unit tests, and it expects a certain output | 01:46 |
tsimonq2 | the problem with that is that it indents | 01:47 |
tsimonq2 | so you need to go to all three of those failing tests and correct the errors :) | 01:47 |
monsterjamp | I'm a bit confused this is what I get for the unit test: http://paste.ubuntu.com/19576664/ | 01:50 |
monsterjamp | But AFAIK that has nothing to do with my plugin? | 01:50 |
tsimonq2 | well sometimes other things break when you add things :) | 01:52 |
tsimonq2 | wait hm | 01:52 |
tsimonq2 | monsterjamp: sudo apt install python3-tabulate | 01:52 |
monsterjamp | Oh, that makes sense. | 01:53 |
tsimonq2 | monsterjamp: you *could* use pip but I usually prefer to do the package :) | 01:53 |
monsterjamp | Looks like I'm missingmore than one dependency | 01:55 |
monsterjamp | But the dependencies aren't even listed in HACKING.md | 01:55 |
monsterjamp | Looks like the unit test is working now | 01:56 |
monsterjamp | I gtg, I'll be back in 30mins | 01:58 |
monsterjamp | Actually nvm, I'll stay here for a bit longer. | 02:03 |
monsterjamp | tsimonq2 how long do these unit tests take? | 02:06 |
tsimonq2 | flexiondotorg: between 5 and 10 mins | 02:11 |
tsimonq2 | whoops sorry flexiondotorg | 02:11 |
tsimonq2 | monsterjamp: between 5 and 10 mins | 02:11 |
monsterjamp | lol I see | 02:12 |
monsterjamp | tsimonq2 so am I supposed to get it to line up? Cause I can't seem to even get the list without "bash" to line up | 02:16 |
tsimonq2 | monsterjamp: correct | 02:19 |
tsimonq2 | monsterjamp: it takes some work ;) | 02:19 |
tsimonq2 | monsterjamp: tip, instead of running all the unit tests over and over, you can do: python3 -m unittest snapcraft.tests.test_commands_list_plugins.ListPluginsCommandTestCase (for example) | 02:22 |
tsimonq2 | monsterjamp: that will save you some time! :D | 02:22 |
monsterjamp | Oh, thanks that will be useful | 02:22 |
monsterjamp | tsimonq2 how does this look on your terminal? I can't get it to line up perfectly: http://paste.ubuntu.com/19580796/ | 02:32 |
* tsimonq2 plays a bit with it | 02:34 | |
tsimonq2 | monsterjamp: well look at the output, it outputs what it expects as well | 02:35 |
tsimonq2 | snapcraft.tests.test_commands_list_plugins.ListPluginsCommandTestCase seems to be easy to fix | 02:36 |
tsimonq2 | + ant catkin copy gradle jdk kernel maven nodejs python2 qmake tar-content | 02:36 |
tsimonq2 | - ant bash cmake go gulp kbuild make nil plainbox-provider python3 scons | 02:36 |
tsimonq2 | sort of the same with snapcraft.tests.test_commands_list_plugins.ListPluginsCommandTestCase | 02:37 |
tsimonq2 | wait...same test case? | 02:37 |
tsimonq2 | you get my point, look at the travis logs | 02:37 |
tsimonq2 | monsterjamp: this is going to be a HUGE pita, but you have to fix it... :/ | 02:38 |
tsimonq2 | wait I have an idea, I'll get back to you | 02:39 |
tsimonq2 | see, if I disable these tests, build the Debian package, then install it on my system, I can get the same output it's expecting | 02:39 |
tsimonq2 | then I can give that to you! | 02:39 |
tsimonq2 | perfect! | 02:40 |
tsimonq2 | monsterjamp: couldn't get it to work sorry | 03:16 |
monsterjamp | tsimonq2 :( | 03:22 |
monsterjamp | What is MAX_CHARACTER_WRAP? Is it equal to 65? | 03:22 |
tsimonq2 | I don't know, sorry | 03:23 |
monsterjamp | If only I knew when it wrapped :/ | 03:24 |
tsimonq2 | monsterjamp: well it shows what it expects to look like and what it was presented in the error | 03:24 |
tsimonq2 | monsterjamp: change it to what is presented :) | 03:25 |
tsimonq2 | for example: AssertionError: 'ant bash cmake go gulp kbuild make[152 chars]nt\n' != 'ant catkin copy gradle jdk kernel mav[139 chars]ns\n' | 03:25 |
tsimonq2 | + ant catkin copy gradle jdk kernel maven nodejs python2 qmake tar-content | 03:25 |
tsimonq2 | - ant bash cmake go gulp kbuild make nil plainbox-provider python3 scons | 03:25 |
tsimonq2 | ? ^ ^^^^^^^^^^ --- -- - ------ | 03:25 |
tsimonq2 | + autotools cmake go gulp kbuild make nil plainbox-provider python3 scons | 03:25 |
tsimonq2 | ? ^ ^^^^^ + ++ + | 03:25 |
tsimonq2 | - autotools catkin copy gradle jdk kernel maven nodejs python2 qmake tar-content | 03:25 |
monsterjamp | I see but what to the + ^ - adnd ? mean, it's overwhelming me :P | 03:26 |
tsimonq2 | monsterjamp: compare it to what's in the code :) | 03:26 |
tsimonq2 | does it want the line that has + or the line that has -? | 03:28 |
monsterjamp | I think I understand now | 03:30 |
tsimonq2 | great :) | 03:33 |
tsimonq2 | sorry I can't help more | 03:33 |
monsterjamp | You signing off? | 03:36 |
tsimonq2 | no, just sorry I couldn't help more :) | 03:39 |
monsterjamp | I can't figure it out, I thought I understood the terminal output :( | 04:24 |
tsimonq2 | monsterjamp: I'll help tomorrow :) | 04:27 |
monsterjamp | What time will you be on tsimonq2? | 04:27 |
tsimonq2 | I have no clue, but sooner rather than later | 04:28 |
monsterjamp | Wait I think I figured it out. I have to modify expected output too... | 04:29 |
monsterjamp | :/ | 04:29 |
tsimonq2 | yes! :P | 04:35 |
monsterjamp | I passed the 3 unit tests :O | 04:48 |
tsimonq2 | monsterjamp: push! :D | 05:20 |
monsterjamp | tsimonq2 pushed :O | 05:25 |
tsimonq2 | yay! | 05:33 |
tsimonq2 | monsterjamp: so the build passed | 05:34 |
monsterjamp | :D | 05:34 |
tsimonq2 | but coveralls failed | 05:34 |
monsterjamp | :( | 05:34 |
tsimonq2 | which means you need coverage | 05:35 |
tsimonq2 | what time zone are you in? just curious | 05:35 |
monsterjamp | GMT-6 | 05:36 |
monsterjamp | It's midnight right now :P | 05:36 |
tsimonq2 | 12:38 by me | 05:38 |
tsimonq2 | same? | 05:38 |
tsimonq2 | (AM) | 05:38 |
monsterjamp | :O | 05:39 |
monsterjamp | Where are you from? I'm from the suburbs of Chicago. | 05:39 |
tsimonq2 | oh! I'm in Green Bay | 05:41 |
monsterjamp | So we're both on the east-most edge of the GMT-6 timzone | 05:43 |
tsimonq2 | yep! :D | 05:43 |
mup | Bug #1555569 opened: [snaps] Show human-readable names for store apps <gnome-software> <sdoc> <Canonical Click Reviewers tools:New> <Snappy:New> <Software Center Agent:Fix Released> <gnome-software (Ubuntu):Triaged> <https://launchpad.net/bugs/1555569> | 05:44 |
tsimonq2 | monsterjamp: I'm going to bed now, then I'll be up in the morning, then I'll be AFK from 12:30ish onwards, so can we talk then or won't you be around? | 05:47 |
mup | Bug #1603610 opened: Snaps have no screenshots <Snappy:New> <gnome-software (Ubuntu):New> <https://launchpad.net/bugs/1603610> | 05:47 |
monsterjamp | tsimonq2 Yeah I'll be on. | 05:47 |
tsimonq2 | great, see you then :l | 05:48 |
monsterjamp | Probably arounf 9am-10am | 05:48 |
tsimonq2 | o/ | 05:48 |
monsterjamp | cya | 05:48 |
=== chihchun_afk is now known as chihchun | ||
=== PatrizioQON is now known as pbek | ||
mup | PR snapd#1558 opened: client,cmd/snap: cleanup cmd/snap test suite, add extra args test <Created by pedronis> <https://github.com/snapcore/snapd/pull/1558> | 09:43 |
mup | PR snapd#1558 closed: client,cmd/snap: cleanup cmd/snap test suite, add extra args test <Created by pedronis> <Merged by pedronis> <https://github.com/snapcore/snapd/pull/1558> | 10:57 |
monsterjamp | Hello | 15:29 |
monsterjamp | tsimonq2 I passed the coverage test :D | 15:57 |
=== JanC is now known as Guest3715 | ||
=== JanC_ is now known as JanC | ||
tsimonq2 | :D | 18:08 |
kyrofa | This airport is boring. Anyone around? | 21:35 |
ali1234 | kyrofa: if you are bored you could try to tackle my challenge from the other day. snap the qopenglwidget so that it runs on the EGLFS backend on raspberry pi. | 21:46 |
kyrofa | ali1234, no pi with which to test I'm afraid. I'm trying out let's encrypt instead | 21:47 |
mup | PR snapcraft#497 opened: Catkin plugin: Enforce C.UTF-8 locale <Created by kyrofa> <https://github.com/snapcore/snapcraft/pull/497> | 21:57 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!