Merge pull request #1277 from psychon/fix-typo

Fix luacheck installation on Travis
This commit is contained in:
Emmanuel Lepage Vallée 2016-12-19 14:29:09 -05:00 committed by GitHub
commit 13fdaa080c
5 changed files with 56 additions and 59 deletions

View File

@ -86,7 +86,7 @@ install:
# Install busted for "make check-unit". # Install busted for "make check-unit".
- travis_retry sudo luarocks install busted - travis_retry sudo luarocks install busted
# Install luacheck for "make check-qa". # Install luacheck for "make check-qa".
- if [ "$DO_QUECKQA" = 1 ]; then travis_retry sudo luarocks install luacheck; fi - if [ "$DO_CHECKQA" = 1 ]; then travis_retry sudo luarocks install luacheck; fi
# Install ldoc for building docs. # Install ldoc for building docs.
- travis_retry sudo luarocks install ldoc 1.4.4 - travis_retry sudo luarocks install ldoc 1.4.4

View File

@ -1,3 +1,6 @@
-- FIXME See commit 7901a1c6479aea
local skip_wallpapers_due_to_weird_slowdowns = true
-- Helper module to replicate a set of steps across multiple screen scenarios -- Helper module to replicate a set of steps across multiple screen scenarios
-- Ideas for improvements: -- Ideas for improvements:
-- * Export an iterator so the suits can call the screen change step by step -- * Export an iterator so the suits can call the screen change step by step
@ -348,58 +351,60 @@ local colors = {
-- Paint it black -- Paint it black
local function clear_screen() local function clear_screen()
-- for s in screen do --FIXME very, very slow on Travis if skip_wallpapers_due_to_weird_slowdowns then
-- local sur = surface.widget_to_surface( return
-- wibox.widget { end
-- bg = "#000000", for s in screen do
-- widget = wibox.container.background local sur = surface.widget_to_surface(
-- }, wibox.widget {
-- s.geometry.width, bg = "#000000",
-- s.geometry.height widget = wibox.container.background
-- ) },
-- wallpaper.fit(sur, s, "#000000") s.geometry.width,
-- end s.geometry.height
)
wallpaper.fit(sur, s, "#000000")
end
end end
-- Make it easier to debug the tests by showing the screen geometry when the -- Make it easier to debug the tests by showing the screen geometry when the
-- tests are executed. -- tests are executed.
local function show_screens() local function show_screens()
--FIXME very, very slow on Travis if skip_wallpapers_due_to_weird_slowdowns then
-- wallpaper.set(color("#000000")) -- Should this clear the wallpaper? It doesn't
--
-- -- Add a wallpaper on each screen
-- for i=1, screen.count() do
-- local s = screen[i]
--
-- local w = wibox.widget {
-- {
-- text = table.concat{
-- "Screen: ",i,"\n",
-- s.geometry.width,"x",s.geometry.height,
-- "+",s.geometry.x,",",s.geometry.y
-- },
-- valign = "center",
-- align = "center",
-- widget = wibox.widget.textbox,
-- },
-- bg = colors[i],
-- fg = "#ffffff",
-- shape_border_color = "#ff0000",
-- shape_border_width = 1,
-- shape = shape.rectangle,
-- widget = wibox.container.background
-- }
-- local sur = surface.widget_to_surface(
-- w,
-- s.geometry.width,
-- s.geometry.height
-- )
-- wallpaper.fit(sur, s)
-- end
--TODO remove this line, all it does it saving some time in the tests until
-- the bug is fixed.
wallpaper.maximized = function() end wallpaper.maximized = function() end
return
end
wallpaper.set(color("#000000")) -- Should this clear the wallpaper? It doesn't
-- Add a wallpaper on each screen
for i=1, screen.count() do
local s = screen[i]
local w = wibox.widget {
{
text = table.concat{
"Screen: ",i,"\n",
s.geometry.width,"x",s.geometry.height,
"+",s.geometry.x,",",s.geometry.y
},
valign = "center",
align = "center",
widget = wibox.widget.textbox,
},
bg = colors[i],
fg = "#ffffff",
shape_border_color = "#ff0000",
shape_border_width = 1,
shape = shape.rectangle,
widget = wibox.container.background
}
local sur = surface.widget_to_surface(
w,
s.geometry.width,
s.geometry.height
)
wallpaper.fit(sur, s)
end
end end
local function add_steps(real_steps, new_steps) local function add_steps(real_steps, new_steps)

View File

@ -1,10 +1,6 @@
local parent = ... --DOC_HIDE local parent = ... --DOC_HIDE
local wibox = require( "wibox" ) --DOC_HIDE local wibox = require( "wibox" ) --DOC_HIDE
local beautiful = require( "beautiful" ) --DOC_HIDE
local assets = require( "xresources.assets" ) --DOC_HIDE local assets = require( "xresources.assets" ) --DOC_HIDE
local color = require( "gears.color" ) --DOC_HIDE
local size = 128 --DOC_HIDE
parent:add( --DOC_HIDE parent:add( --DOC_HIDE

View File

@ -1,10 +1,6 @@
local parent = ... --DOC_HIDE local parent = ... --DOC_HIDE
local wibox = require( "wibox" ) --DOC_HIDE local wibox = require( "wibox" ) --DOC_HIDE
local beautiful = require( "beautiful" ) --DOC_HIDE
local assets = require( "xresources.assets" ) --DOC_HIDE local assets = require( "xresources.assets" ) --DOC_HIDE
local color = require( "gears.color" ) --DOC_HIDE
local size = 128 --DOC_HIDE
parent:add( --DOC_HIDE parent:add( --DOC_HIDE
@ -13,7 +9,7 @@ wibox.widget {
draw = function(_, _, cr) draw = function(_, _, cr)
assets.gen_logo(cr, 128, 128, nil, "#535d6c") assets.gen_logo(cr, 128, 128, nil, "#535d6c")
cr:translate(128 + 128/16, 0) cr:translate(128 + 128/16, 0)
assets.gen_awesome_name(cr, 0, 158, nil, "#535d6c", alt_fg, true) assets.gen_awesome_name(cr, 158, nil, "#535d6c", nil)
end, end,
widget = wibox.widget.base.make_widget widget = wibox.widget.base.make_widget
} }

View File

@ -61,7 +61,7 @@ local function make_letter(cr, n, lines, size, bg, fg, alt_fg)
end end
lines = lines or {} lines = lines or {}
color = alt_fg or fg local color = alt_fg or fg
cr:set_source(gears.color(color)) cr:set_source(gears.color(color))
cr:rectangle( cr:rectangle(
0, (size+letter_gap)*n, 0, (size+letter_gap)*n,
@ -83,7 +83,7 @@ local function make_letter(cr, n, lines, size, bg, fg, alt_fg)
cr:set_operator(cairo.Operator.OVER) cr:set_operator(cairo.Operator.OVER)
end end
function theme_assets.gen_awesome_name(cr, width, height, bg, fg, alt_fg, vertical) function theme_assets.gen_awesome_name(cr, height, bg, fg, alt_fg)
local ls = height/10 -- letter_size local ls = height/10 -- letter_size
local letter_line = ls/18 local letter_line = ls/18
@ -178,7 +178,7 @@ function theme_assets.wallpaper(bg, fg, alt_fg, s)
cr:set_source(gears.color(bg)) cr:set_source(gears.color(bg))
cr:paint() cr:paint()
theme_assets.gen_awesome_name(cr, width, height, bg, fg, alt_fg, true) theme_assets.gen_awesome_name(cr, height, bg, fg, alt_fg)
return img return img
end end