SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Github Development

Notices

SageTV Github Development Discussion related to SageTV Open Source Development. Use this forum for development topics about the Open Source versions of SageTV, hosted on Github.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-30-2015, 07:55 AM
ptoal ptoal is offline
Sage User
 
Join Date: Jan 2007
Posts: 43
Tests? Continuous Integration?

Being a TDD type of guy, I was wondering if there were any plans to create a CI server and/or create a test suite?

At the moment, I think we're all just hacking, trying to get things working for our needs, but at some point, it would be nice to start "cleaning up" a lot of the code and infrastructure of the project.

I was thinking of having my jenkins server do builds on Sage, but I don't want to duplicate efforts, if someone is already planning this. Also, I'm not sure how to do the windows builds, since I got off the Windows Train over a decade ago.

Comments?
Reply With Quote
  #2  
Old 10-30-2015, 08:37 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,712
I've been looking into Shippable and setting up a CI build from there. My goal wasn't so much a build for every check-in approach (which is valuable, just don't want to have 1000s of downloads on BinTray). So, I'm looking at Shippable to be used to fire off release builds.

I think someone else has done it as well for every checkin, using Shippable.

Certainly the long term vision includes a CI server and unit testing. I think that given that there are no existing unit tests, unit tests will likely be something that is built up over time for modified code. I know I'd love to see a unit test with every check-in, but I work with enough enterprise software to know that unless code is architected to facilitate unit tests, then it becomes hard to write effective tests. In many cases code needs to be refactored, etc, to allow for easier testing.
Reply With Quote
  #3  
Old 10-30-2015, 08:48 AM
JustFred JustFred is offline
Sage Expert
 
Join Date: May 2015
Location: Sunnyvale, Ca
Posts: 563
I think there's real value in some kind of regular build (either nightly or pull-triggered). I'm willing to help with getting the windows native code to build from the command line.

I don't have any opinion about the choice of TDD vs BDD vs Unit test, but strongly suspect that the original Sage team had some sort of test suite that they used. It might even have included canned transport streams that could be fed into Sage. Maybe we could get access to that work as a starting point.
__________________
System #1: Win7-64, I7-920, 8 GB mem, 4TB HD. Java-64 1.8.0_141. Sage-64 v9.2.1 ATSC: 2x HDHR-US (1st gen white) tuners. HD-200.
System #2: Win7-64, I7-920, 8 GB mem, 4TB HD. Java 1.8.0_131. Sage v9.1.6.747. ClearQAM: 2x HDHR3-US tuners. HD-200.
System #3: Win7-64, I7-920, 12 GB mem, 4TB HD. Java-64 1.8.0_141. Sage-64 v9.2.1 ATSC: 2x HVR2250; Spectrum Cable via HDPVR & USB-UIRT. 3x HD-200.
Reply With Quote
  #4  
Old 10-30-2015, 09:09 AM
ptoal ptoal is offline
Sage User
 
Join Date: Jan 2007
Posts: 43
Quote:
Originally Posted by stuckless View Post
I know I'd love to see a unit test with every check-in, but I work with enough enterprise software to know that unless code is architected to facilitate unit tests, then it becomes hard to write effective tests. In many cases code needs to be refactored, etc, to allow for easier testing.
<sarcasm>Really? I've never seen that happen.</sarcasm>

I haven't even looked at the Java code yet, since I've spent most of my time getting natives to compile on FreeBSD. I suspect that there's a lot of modularization and refactoring that would have to be done to support good tests. That said, even having some basic smoke tests would be helpful at this point.

Quote:
Originally Posted by JustFred View Post
I don't have any opinion about the choice of TDD vs BDD vs Unit test, but strongly suspect that the original Sage team had some sort of test suite that they used. It might even have included canned transport streams that could be fed into Sage. Maybe we could get access to that work as a starting point.
Hm... Based on my experience with the product over the years, I'm not so sure. I seem to recall a number of builds that seemed to be "code, compile and ship". These guys were good, but they weren't big. Also, the whole "Agile Movement" didn't really get legs until well after SageTV was established.

If I have to be honest, I don't have a ton of time to dedicate to developing for SageTV. I just want to be effective in anything I develop. I have this FreeBSD branch, for example, that I'm nervous about submitting a PR for, because I don't know if it will break any other builds. I don't think we have a big enough development community at this point to start writing Community Contribution Guidelines, and managing things more formally. It would be nice, though, if we all knew we were rowing the boat in the same direction.
Reply With Quote
  #5  
Old 10-30-2015, 10:26 AM
JustFred JustFred is offline
Sage Expert
 
Join Date: May 2015
Location: Sunnyvale, Ca
Posts: 563
My comment about the possibility of an existing test suite was based on some things I've seen in the native code.

The work that I did to move native code from vs2005 to vs2015 made it pretty clear that there had been some fairly recent changes to that code that managed to skip the compile step of "code, compile and ship". So I'm in favor of an automated build.

Just because we can't do **everything** doesn't mean we shouldn't do **something**.

Like you, I've got some specific bugs that I'd like to fix (without introducing regression issues). Currently they involve the transport stream, in native code, so the ability to feed a canned TS into the beast would give a higher confidence that a fix for cable clear QAM didn't break Sat.
__________________
System #1: Win7-64, I7-920, 8 GB mem, 4TB HD. Java-64 1.8.0_141. Sage-64 v9.2.1 ATSC: 2x HDHR-US (1st gen white) tuners. HD-200.
System #2: Win7-64, I7-920, 8 GB mem, 4TB HD. Java 1.8.0_131. Sage v9.1.6.747. ClearQAM: 2x HDHR3-US tuners. HD-200.
System #3: Win7-64, I7-920, 12 GB mem, 4TB HD. Java-64 1.8.0_141. Sage-64 v9.2.1 ATSC: 2x HVR2250; Spectrum Cable via HDPVR & USB-UIRT. 3x HD-200.

Last edited by JustFred; 10-30-2015 at 04:13 PM.
Reply With Quote
  #6  
Old 10-30-2015, 12:08 PM
Narflex's Avatar
Narflex Narflex is offline
Sage
 
Join Date: Feb 2003
Location: Redondo Beach, CA
Posts: 6,319
Quote:
Originally Posted by JustFred View Post
I don't have any opinion about the choice of TDD vs BDD vs Unit test, but strongly suspect that the original Sage team had some sort of test suite that they used. It might even have included canned transport streams that could be fed into Sage. Maybe we could get access to that work as a starting point.
Sorry, we did not have any kind of test suite at SageTV. It was basically build and then internal manual tests (or more extensive in certain components depending upon what changed). Then a couple of us would run it at home ourselves for a day or two, and then feed it to the beta testers after that. It was mainly due to the small number of devs (4 for the majority of the timeframe); and clear isolation of who worked on what (Java, STV, Linux Native, Windows Native) that we could ensure quality this way. There were also quick releases of stuff when we were highly confident in a minor fix being pushed out directly.

There were a few test things in the code; such as for FFMPEG format detection (where it can redetect everything to be sure it got the same results as last time)...but you need a highly diverse content library (which we used to have, but Google's opinion on fair use is a little more cautious than ours was so we had to leave it behind) to make that effective.
__________________
Jeffrey Kardatzke
Google
Founder of SageTV
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Continuous integration builds? rsteele SageTV Github Development 2 08-15-2015 02:44 PM
STV Update Tests for beta v6.4 Opus4 SageTV Beta Test Software 64 07-23-2008 11:06 PM
Multispeed Continuous FF/REW johnnyspo SageTV Customizations 2 12-18-2007 11:30 AM
Continuous recording - help wjb SageTV Software 14 03-18-2005 03:26 PM
Anyone can do tests with DUAL vbdvcr? _Demo_ Hardware Support 9 07-08-2003 09:07 AM


All times are GMT -6. The time now is 10:41 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.