class TestBareMinumumCompilation(unittest.TestCase): #---------------------------------------------------------------------- @classmethod def compilation(cls, board): code = "void setup(){}; void loop(){}" def inter(self): try: Pinguino.set_board(board) except BaseException, msg: raise BaseException("Compilation: imposible set board %s\n%s" % (board.name, str(msg))) if board.arch == 8: for key in Pinguino.dict_boot.keys(): boot = Pinguino.dict_boot[key] Pinguino.set_bootloader(boot) try: Pinguino.compile_string(code) except BaseException, msg: self.fail( "Compilation: impossible compile for %s, %sbits, boot:%s\n%s" % (board.name, board.arch, str(msg), key)) if board.arch == 32: try: Pinguino.compile_string(code) except BaseException, msg: #raise BaseException("Compilation: impossible compile for %s, %sbits\n%s" % (board.name, board.arch, str(msg))) self.fail( "Compilation: impossible compile for %s, %sbits\n%s" % (board.name, board.arch, str(msg)))
def compilation(cls, board): code = "void setup(){}; void loop(){}" def inter(self): try: Pinguino.set_board(board) except BaseException, msg: raise BaseException("Compilation: imposible set board %s\n%s" % (board.name, str(msg))) if board.arch == 8: for key in Pinguino.dict_boot.keys(): boot = Pinguino.dict_boot[key] Pinguino.set_bootloader(boot) try: Pinguino.compile_string(code) except BaseException, msg: self.fail("Compilation: impossible compile for %s, %sbits, boot:%s\n%s" % (board.name, board.arch, str(msg), key))